Cell's filterFn never gets called
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 3.6k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 10
Description
Describe the bug
The filterFn prop of a cell definition never gets called.
My initial problem was that the filterFn's resolveFilterValue was never called, but in fact filterFn is just ignored.
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/stupefied-water-3kcw7h?embed=1&file=%2Fsrc%2Fmain.tsx%3A52%2C18
Steps to reproduce
1 Create a basic table with a filterFn prop on a cell
2 Optionally add globalFilter
3 try to search
Expected behavior
As a user I expect filterFn to be called, but returning false from the fn of plain console.log/alert never gets executed.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
macOS
react-table version
8.9.3
TypeScript version
5.1.3
Additional context
No response
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction at src/main.tsx around line 52, then inspect how the cell definition's filterFn is used with globalFilter. Confirm the current behavior against react-table 8.9.3, and consider the issue complete when filterFn is invoked during filtering and its return value affects the results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100