incorrect Row ID in "Pagination Controlled" react example
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 row ID and index are not changing when switching pages while using manual pagination with react query data.
This bug means each row after the first page is receiving an incorrect key because <tr key={row.id}>
This could be related to #4812 and #4771
This is the example from the docs and below is the modified version to highlight the incorrect row IDs in the console.
Your minimal, reproducible example
https://codesandbox.io/s/throbbing-wildflower-byp0ht?file=/src/main.tsx
Steps to reproduce
- open console
- switch between pages
- notice the row IDs are not changing
Expected behavior
The row IDs should change when switching pages.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: Linux
- Browser: Chrome
- Version: 113
react-table version
v8.9.1
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 Pagination Controlled React example linked in the issue and reproduce the behavior using the provided CodeSandbox. Switch pages while watching the console to determine why the row IDs and indexes remain unchanged; done means the example reports the correct IDs and indexes for each page.
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
- 45/100