Pagination for large table off by 1
Issue Check list
- [x] Agree to the Code of Conduct
- [x] Read the README
- [x] You are using React 16.8.0+
- [x] You installed
styled-components - [x] Include relevant code or preferably a code sandbox
Describe the bug
A clear and concise description of what the bug is.
With a data table that uses an id to sort that is number::number, when sorting desc the first element (1::1) gets paginated into its own section. This makes all other groupings off by 1. eg section 1::* include 2::1, and 2::* includes 3::1 when each should only include 2::* or 3::* respectively. Table size here is 26*40 (26 main sections, 40 sub elements each)
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Code Sandbox, Screenshots, or Relevant Code
Please include a codesandbox to help expedite troublshooting.
https://codesandbox.io/embed/react-data-table-sandbox-ccyuu
Otherwise, add screenshots and/or complete sample code to help explain your problem.
Versions (please complete the following information)
- React (RDT requires 16.8.0+)
- Styled Components
- OS: MacOS
- Browser chrome
Additional context
Add any other context about the problem here.