Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically change filter value for a column #862

Open
rOY369 opened this issue Aug 28, 2024 · 1 comment
Open

Dynamically change filter value for a column #862

rOY369 opened this issue Aug 28, 2024 · 1 comment
Labels
question Further information is requested

Comments

@rOY369
Copy link

rOY369 commented Aug 28, 2024

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 rOY369 added the question Further information is requested label Aug 28, 2024
@Domino987
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants