|
|
@ -3,6 +3,7 @@ import {
|
|
|
|
TableState,
|
|
|
|
TableState,
|
|
|
|
useReactTable,
|
|
|
|
useReactTable,
|
|
|
|
Row,
|
|
|
|
Row,
|
|
|
|
|
|
|
|
Column,
|
|
|
|
getCoreRowModel,
|
|
|
|
getCoreRowModel,
|
|
|
|
getPaginationRowModel,
|
|
|
|
getPaginationRowModel,
|
|
|
|
getFilteredRowModel,
|
|
|
|
getFilteredRowModel,
|
|
|
@ -130,6 +131,7 @@ export function Datatable<
|
|
|
|
getFacetedMinMaxValues: getFacetedMinMaxValues(),
|
|
|
|
getFacetedMinMaxValues: getFacetedMinMaxValues(),
|
|
|
|
getExpandedRowModel: getExpandedRowModel(),
|
|
|
|
getExpandedRowModel: getExpandedRowModel(),
|
|
|
|
getRowCanExpand,
|
|
|
|
getRowCanExpand,
|
|
|
|
|
|
|
|
getColumnCanGlobalFilter,
|
|
|
|
...(isServerSidePagination ? { manualPagination: true, pageCount } : {}),
|
|
|
|
...(isServerSidePagination ? { manualPagination: true, pageCount } : {}),
|
|
|
|
meta,
|
|
|
|
meta,
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -258,3 +260,10 @@ function globalFilterFn<D>(
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getColumnCanGlobalFilter<D>(column: Column<D, unknown>): boolean {
|
|
|
|
|
|
|
|
if (column.id === 'select') {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|