Skip to content

Commit 042711e

Browse files
committed
Add columnsFilters in renderer selector
1 parent 2fa6f91 commit 042711e

File tree

1 file changed

+6
-1
lines changed
  • src/components/table/body/header

1 file changed

+6
-1
lines changed

src/components/table/body/header/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ import { useTableState } from "../../provider"
44
import Cell from "./cell"
55

66
const rerenderSelector = state => {
7+
const columns = state.table?.getAllColumns() || []
8+
79
return {
810
sizing: state.columnSizing,
911
expanded: state.expanded,
1012
columnVisibility: state.columnVisibility,
1113
selectedRows: state.selectedRows,
1214
grouping: state.grouping,
13-
columnsCount: state.table && state.table.getAllColumns().length,
15+
columnsCount: columns.length,
16+
columnsFilters: columns.map(({ columnDef }) => ({
17+
filterOptions: columnDef?.meta?.filter?.options,
18+
})),
1419
}
1520
}
1621

0 commit comments

Comments
 (0)