We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
columns
table ref
columnFilters
filters
1 parent 5fa4629 commit 8a17ea5Copy full SHA for 8a17ea5
2 files changed
.changeset/five-clouds-stare.md
@@ -0,0 +1,5 @@
1
+---
2
+"@refinedev/react-table": patch
3
4
+
5
+fix: get always latest `columns` from `table ref` when `columnFilters` or `filters` are changed.
packages/react-table/src/useTable/index.ts
@@ -155,8 +155,12 @@ export function useTable<
155
}, [sorting]);
156
157
useEffect(() => {
158
+ const allColumns = reactTableResult
159
+ .getAllColumns()
160
+ .map((col) => col.columnDef);
161
162
const crudFilters: CrudFilter[] = columnFiltersToCrudFilters({
- columns,
163
+ columns: allColumns,
164
columnFilters,
165
});
166
0 commit comments