globalFilter that can apply to specific columns
Hi there! I have a feature where I can have the global filter apply to all columns, or narrow it down to specific columns. Was wondering what the best approach would be for implementing this?
For example, if I had this table:
if I searched by default for "Taylor", I'd expect 2 rows returned. But if I narrow it to the
firstName
column and set a global search for "Taylor", I'd expect just a single row returned.
Thanks for any help you can provide 🙂2 Replies
blank-aquamarineOP•3y ago
I was thinking that this might be helpful but wondering if anyone has solved this in a different way: https://tanstack.com/table/v8/docs/api/features/filters#getcolumncanglobalfilter
Filters | TanStack Table Docs
Can-Filter
The ability for a column to be column filtered is determined by the following:
blank-aquamarineOP•3y ago
I think the problem with this approach is changing
getColumnCanGlobalFilter
doesn't cause the table to recalculate the filtered rows 😦