kit
kit copied to clipboard
An error with CSP if you run `npm run check` during `npm run dev`
Describe the bug
As mentioned in title, rows are not filtered when table.setGlobalFilter(0).
It seems like rows get filtered only when globalFilter value is truthy. (found in line 19 and 69 in getFilteredRowModel.ts, also in getFacetedRowModel.ts)
I added fliterFn.autoRenew to always return false in order to prevent filter value being removed from the filter state, but it didn't work as well.
Your minimal, reproducible example
https://codesandbox.io/s/determined-ellis-td1g4l?file=/src/App.tsx
Steps to reproduce
- Open codesandbox link.
- In browser tab, choose an option from input(select) in following orders: "Complicated", "Single", and "Relationship". Selecting each option will update
globalFilterto1,2, and0. - When
globalFilteris set to0,table.getFilteredRowModel()returns non-filtered rows.
Expected behavior
I would expect that globalFilter should also be applied when its value is 0.
value 0 is often used as some kind of "status" and it represents valid value as number.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
OS: macOS Monterey 12.2.1 Browser: Chrome v106.0.5249.103 (Official Build) (arm64) Editor: VSCode Version: 1.72.1 (Universal) React: v17.0.2
react-table version
v8.5.18
TypeScript version
v4.5.5
Additional context
No response
Terms & Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] 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.
Can reproduce.
a few years later -___-
a few years later -___-
feel free to pr