TanStackT
TanStack2y ago
5 replies
dangerous-fuchsia

Dynamic Checkbox Options Update

Hello. I have a table with a sidebar that has checkboxes to filter the table. The checkbox options are created dynamically based on the table's data.

For example, "DC-DC Converter" appears because it's in the table.

I made a custom filter, and it works. My problem is updating the checkbox options after filtering. If "DC-DC Converter" is no longer in the filtered table, it shouldn't be in the checkbox options anymore. I tried using table.getRowModel().rows to get the filtered data, but it didn't work. I want client side filtering for this since the table doesn't have lots of data.

Do you have any suggestions? Any idea is greatly appreciated. Thanks!
Screenshot_2024-06-14_at_3.44.36_PM.jpg
Was this page helpful?