core icon indicating copy to clipboard operation
core copied to clipboard

Dynamically change filter value for a column

Open rOY369 opened this issue 1 year ago • 1 comments

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.

rOY369 avatar Aug 28 '24 19:08 rOY369

Would you be able to add a sandbox with your code and what you tried?

Domino987 avatar Sep 01 '24 17:09 Domino987

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.

stale[bot] avatar Dec 03 '24 05:12 stale[bot]