T
TanStack2w ago
inland-turquoise

How to trigger global filtering re‑evaluation when column enableGlobalFilter flags change?

I’m using TanStack Table with a global filter and per‑column flags (enableGlobalFilter). In my setup, users can toggle which columns participate in global filtering via checkboxes (see screenshot). When a column’s enableGlobalFilter is toggled, the change correctly updates the column definition and is reflected in table.getColumn(id)?.getCanGlobalFilter(). However, the table’s displayed results don’t update until I modify the global filter text itself. It seems the global filter row model only re‑evaluates when the global filter value changes, not when the filterable columns change. I tried calling "table.setGlobalFilter(table.getState().globalFilter)" in my checkbox change handler, but that didn’t trigger a re‑filtering pass (presumably because the global filter value didn’t actually change). When a column’s enableGlobalFilter flag changes, I would expect the table to immediately re‑apply the global filter to the dataset — without requiring the user to type or modify the global filter value. Is this the intended behavior (global filtering only re‑runs when the filter value changes)? If so, what’s the recommended way to force the table to re‑evaluate global filtering when column definitions change?
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?