fix(react/datatable): override getColumnCanGlobalFilter method (#9990)
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
TableState,
|
||||
useReactTable,
|
||||
Row,
|
||||
Column,
|
||||
getCoreRowModel,
|
||||
getPaginationRowModel,
|
||||
getFilteredRowModel,
|
||||
@@ -130,6 +131,7 @@ export function Datatable<
|
||||
getFacetedMinMaxValues: getFacetedMinMaxValues(),
|
||||
getExpandedRowModel: getExpandedRowModel(),
|
||||
getRowCanExpand,
|
||||
getColumnCanGlobalFilter,
|
||||
...(isServerSidePagination ? { manualPagination: true, pageCount } : {}),
|
||||
meta,
|
||||
});
|
||||
@@ -258,3 +260,10 @@ function globalFilterFn<D>(
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getColumnCanGlobalFilter<D>(column: Column<D, unknown>): boolean {
|
||||
if (column.id === 'select') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user