core
core copied to clipboard
Dynamically change filter value for a column
Hi, I have a use case where I want a click event to dynamically change the filter value for a column in my table component.
defaultFilter works fine If I pass it in my initial columns definition.
But then I dynamically change the defaultFilter prop of a specific column in useEffect -> it doesn't work.
Changing the prop like filtering to false from true works just fine in the same useEffect and removes the filtering dynamically. This indicates that the there is no problem with useEffect itself.
How can I dynamically change the filter value of a column based on an outside event or change of some other state? Am I using the correct prop for the column or is there any other prop for this use case?
Any help would be appreciated regarding this. Thanks in advance.
Would you be able to add a sandbox with your code and what you tried?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.