Skip to content

autoResetPageIndex not resetting properly #5459

Description

@marcellino-ornelas

TanStack Table version

8.15.0

Framework/Library version

^18.2.0

Describe the bug

Hello, Im running into a issue with the autoResetPageIndex showing/processing the incorrect page Index when using client side pagination and changing the rows per page.

Steps to reproduce

  1. Click next page 2 times so you see Page 3 of 10,000
  2. Click the rows per page option
  3. Select option show 20

You will now see the incorrect number Page 2 of 5,000

Expected behavior

  1. Click next page 2 times so you see Page 3 of 10,000
  2. Click the rows per page option
  3. Select option show 20

You should now see Page 1 of 5,000

How often does this bug happen?

Every time

Platform

  • macOS 14.4.1
  • Chrome 123.0.6312.87 (Official Build) (x86_64)

TypeScript version

5.1.6

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://stackblitz.com/edit/tanstack-table-csasqf?file=src%2Fmain.tsx

Screenshots or Videos (Optional)

Screen.Recording.2024-04-01.at.4.44.46.PM.mov

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions