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.
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)
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
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