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!
1 Reply
deep-jadeOP•15mo ago
I just tried Column Faceting but it's giving me this error:
Rendered fewer hooks than expected. This may be caused by an accidental early return statement.
Here's my filter function:
I finally got it. The error was caused by used() hook.
Using Column Faceted work, it updates the checkbox options.