shadcn-table
shadcn-table copied to clipboard
how to use Global filter
by adding this:
const [globalFilter, setGlobalFilter] = React.useState(null);
const table = useReactTable({
...
onGlobalFilterChange: setGlobalFilter,
...
state: {
globalFilter,
},
});
Uou can check the TanStackTable documentation, it is very complete, I leave you the link: https://tanstack.com/table/v8/docs/api/features/global-filtering
Filtering that many columns server side might not be a good approach.
Maybe it should be used on the client side.
You can follow the example, and docs provided above to get started.