You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set a numeric column filter, it immediately reverts to undefined, but it works if I set it to a string value.
constcol=table.getColumn('colour');constonClick=()=>{col.setColumnFilter('purple');};useEffect(()=>{console.log(col.getColumnFilter());// prints undefined, undefined, purple},[col]);
But when I use a numeric column filter value it behaves differently.
constcol=table.getColumn('colourId');constonClick=()=>{col.setColumnFilter(99);};useEffect(()=>{console.log(col.getColumnFilter());// prints undefined, undefined},[col]);
The sandbox shows the issue pretty clearly.
Click the "Red colour" filter button and view that the filter works.
Click the "Clear filters" button to reset the filters.
Click the "Red colourId" filter button and see that it does nothing. Essentially the filter set up in showRedByIdClicked() has not effect...
Let me know if there is more I can do to help.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms & Code of Conduct
I agree to follow this project's Code of Conduct
I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
The text was updated successfully, but these errors were encountered:
sheam
changed the title
setColumnFilter(num) fails to set filter value
setColumnFilter(num) is broken when given a numeric value
Mar 7, 2025
TanStack Table version
8.21.2
Framework/Library version
React 18.2.0
Describe the bug and the steps to reproduce it
When I set a numeric column filter, it immediately reverts to undefined, but it works if I set it to a string value.
But when I use a numeric column filter value it behaves differently.
The sandbox shows the issue pretty clearly.
showRedByIdClicked()
has not effect...Let me know if there is more I can do to help.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://codesandbox.io/p/sandbox/kzxcl2
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms & Code of Conduct
The text was updated successfully, but these errors were encountered: