Skip to content

Commit

Permalink
feat: refactor tableQueryResult name to tableQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
alicanerdurmaz committed Jul 23, 2024
1 parent fa2d7a4 commit d47d49e
Show file tree
Hide file tree
Showing 155 changed files with 501 additions and 378 deletions.
12 changes: 12 additions & 0 deletions .changeset/itchy-dancers-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@refinedev/core": minor
---

feat: [`useTable`](https://refine.dev/docs/data/hooks/use-table/)'s `tableQueryResult` is deprecated, use `tableQuery` instead. #6169

```diff
import { useTable } from '@refinedev/core';

- const { tableQueryResult } = useTable();
+ const { tableQuery } = useTable();
```
12 changes: 12 additions & 0 deletions .changeset/rich-swans-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@refinedev/mui": minor
---

feat: [`useDataGrid`](https://refine.dev/docs/ui-integrations/material-ui/hooks/use-data-grid/)'s `tableQueryResult` is deprecated, use `tableQuery` instead. #6169

```diff
import { useDataGrid } from '@refinedev/mui';

- const { tableQueryResult } = useDataGrid();
+ const { tableQuery } = useDataGrid();
```
21 changes: 21 additions & 0 deletions .changeset/sixty-countries-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@refinedev/antd": minor
---

feat: [`useTable`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-table/)'s `tableQueryResult` is deprecated, use `tableQuery` instead. #6169

```diff
import { useTable } from '@refinedev/core';

- const { tableQueryResult } = useTable();
+ const { tableQuery } = useTable();
```

feat: [`useSimpleList`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-simple-list/)'s `queryResult` is deprecated, use `query` instead. #6169

```diff
import { useSimpleList } from '@refinedev/antd';

- const { queryResult } = useSimpleList();
+ const { query } = useSimpleList();
```
2 changes: 1 addition & 1 deletion documentation/blog/2022-03-22-refine-with-react95.md
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ export const PostList = () => {
setPageIndex,
setPageSize,
refineCore: {
tableQueryResult: { isLoading },
tableQuery: { isLoading },
},
} = useTable<IPost>({
columns,
Expand Down
14 changes: 7 additions & 7 deletions documentation/blog/2023-01-17-airtable-crud-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export const Layout: React.FC<LayoutProps> = ({ children }) => {
const { push } = useNavigation();

return (
<div className="py-4 pr-4 flex min-h-screen flex-col border md:flex-row">
<div className="flex min-h-screen flex-col border py-4 pr-4 md:flex-row">
<div className="mb-2 border-b py-2 md:w-2/12">
<div className="container mx-auto">
<div className="flex flex-col items-center gap-2">
Expand Down Expand Up @@ -561,7 +561,7 @@ export const PostList: React.FC = () => {
<th
key={header.id}
colSpan={header.colSpan}
className="py-3 px-6 text-left text-xs font-medium uppercase tracking-wider text-gray-700 "
className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-700 "
>
{flexRender(
header.column.columnDef.header,
Expand All @@ -580,7 +580,7 @@ export const PostList: React.FC = () => {
return (
<td
key={cell.id}
className="whitespace-nowrap py-2 px-6 text-sm font-medium text-gray-900"
className="whitespace-nowrap px-6 py-2 text-sm font-medium text-gray-900"
>
{flexRender(
cell.column.columnDef.cell,
Expand Down Expand Up @@ -684,7 +684,7 @@ export const PostList: React.FC = () => {
getRowModel,
setOptions,
refineCore: {
tableQueryResult: { data: tableData },
tableQuery: { data: tableData },
},
} = useTable<IPost>({ columns });

Expand Down Expand Up @@ -726,7 +726,7 @@ export const PostList: React.FC = () => {
<th
key={idx}
colSpan={header.colSpan}
className="py-3 px-6 text-left text-xs font-medium uppercase tracking-wider text-gray-700 "
className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-700 "
>
{flexRender(
header.column.columnDef.header,
Expand All @@ -745,7 +745,7 @@ export const PostList: React.FC = () => {
return (
<td
key={idx}
className="whitespace-nowrap py-2 px-6 text-sm font-medium text-gray-900"
className="whitespace-nowrap px-6 py-2 text-sm font-medium text-gray-900"
>
{flexRender(
cell.column.columnDef.cell,
Expand Down Expand Up @@ -1526,7 +1526,7 @@ export const PostList: React.FC = () => {
getRowModel,
setOptions,
refineCore: {
tableQueryResult: { data: tableData },
tableQuery: { data: tableData },
},
getState,
setPageIndex,
Expand Down
2 changes: 1 addition & 1 deletion documentation/blog/2023-04-13-refine-invoicer-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ Endowed a due patience, we can see this in action among many others in the `@ref

```tsx title="node_modules/@refinedev/antd/src/hooks/table/useTable/useTable.ts"
const {
tableQueryResult,
tableQuery,
current,
setCurrent,
pageSize,
Expand Down
14 changes: 7 additions & 7 deletions documentation/blog/2023-07-02-refine-tremor-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const currencyFormatter = Intl.NumberFormat("en-US", {
});

export default () => (
<Card className="max-w-xs mx-auto">
<Card className="mx-auto max-w-xs">
<Text>Revenue</Text>
<Metric>{currencyFormatter.format(3_500)}</Metric>
</Card>
Expand Down Expand Up @@ -597,7 +597,7 @@ export const DashboardPage: React.FC = () => {
</TabList>
<TabPanels>
<TabPanel>
<Grid numItemsMd={2} numItemsLg={3} className="gap-6 mt-6">
<Grid numItemsMd={2} numItemsLg={3} className="mt-6 gap-6">
<Card>
<div className="h-28" />
</Card>
Expand Down Expand Up @@ -842,7 +842,7 @@ export const DashboardPage: React.FC = () => {
</TabList>
<TabPanels>
<TabPanel>
<Grid numItemsMd={2} numItemsLg={3} className="gap-6 mt-6">
<Grid numItemsMd={2} numItemsLg={3} className="mt-6 gap-6">
//highlight-start
<KpiCard
title="Weekly Revenue"
Expand Down Expand Up @@ -977,7 +977,7 @@ export function ChartView({ revenue, orders, customers }: IProps) {

return (
<Card>
<div className="md:flex justify-between">
<div className="justify-between md:flex">
<div>
<Flex
justifyContent="start"
Expand Down Expand Up @@ -1014,7 +1014,7 @@ export function ChartView({ revenue, orders, customers }: IProps) {
showLegend={true}
valueFormatter={formatters[selectedKpi]}
yAxisWidth={56}
className="h-96 mt-8"
className="mt-8 h-96"
/>
</Card>
);
Expand Down Expand Up @@ -1246,7 +1246,7 @@ export const Details = () => {
getHeaderGroups,
getRowModel,
refineCore: {
tableQueryResult: { data: tableData },
tableQuery: { data: tableData },
},
getState,
setPageIndex,
Expand Down Expand Up @@ -1402,7 +1402,7 @@ export const Details = () => {
<TextInput
type="text"
placeholder="Enter Page"
className="max-w-xs w-1/8"
className="w-1/8 max-w-xs"
defaultValue={`${getState().pagination.pageIndex + 1}`}
onChange={(e) => {
const { value } = e.target;
Expand Down
Loading

0 comments on commit d47d49e

Please sign in to comment.