react-data-table-component icon indicating copy to clipboard operation
react-data-table-component copied to clipboard

Pagination for large table off by 1

Open NathanMoes opened this issue 1 year ago • 0 comments

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. 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. Screenshot 2024-01-18 at 8 43 35 AM Screenshot 2024-01-18 at 8 43 56 AM

NathanMoes avatar Jan 18 '24 16:01 NathanMoes