getIsAllRowsSelected returns unexpected result when using manual pagination
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
When using manualPagination and supplying a pageCount, and then calling the function returned by getToggleAllPageRowsSelectedHandler - would expect getIsAllRowsSelected to be false, but this is not the case.
In fact, I would expect it to be impossible for getIsAllRowsSelected to be true whenever pageCount is greater than 1 when using manualPagination - is this the wrong mental model or a bug?
Your minimal, reproducible example
Steps to reproduce
- Click "Toggle all page rows selected"
- Observe output
Expected behavior
As a user I would expect it to be impossible for getIsAllRowsSelected to be true whenever pageCount is greater than 1 when using manualPagination, as the table can't know the ids of those rows in order to "select" them
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
MacOS / Chrome
react-table version
8.7.9
TypeScript version
No response
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 and trace the interaction between getToggleAllPageRowsSelectedHandler and getIsAllRowsSelected under manualPagination with a supplied pageCount. Confirm the behavior across multiple pages and determine whether the reported expectation is correct. Done means the selection state consistently reflects the supported manual-pagination behavior and the reproduction no longer shows the unexpected result.
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
- 38/100