Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getTopRows() and getBottomRows() Not Referentially Stable Between Renders #5624

Closed
2 tasks done
ryanagillie opened this issue Jun 24, 2024 · 0 comments
Closed
2 tasks done

Comments

@ryanagillie
Copy link

ryanagillie commented Jun 24, 2024

TanStack Table version

v8.17.3

Framework/Library version

React v18.3.1

Describe the bug and the steps to reproduce it

The result of getTopRows() and getBottomRows() referentially changes between renders even when rows have not been added / removed to the top or bottom. getCenterRows() behaves correctly.

Ran into this while trying to create a performant virtualizer with pinned rows & custom range extractor.

In the codesandbox example open the console and continuously click the "rerender" button, the console will continuously print "Top Rows Changed" / "Bottom Rows Changed" while center does not.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://codesandbox.io/p/devbox/peaceful-lake-3f29m5?file=%2Fsrc%2Fmain.tsx%3A93%2C38

Screenshots or Videos (Optional)

No response

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

No, because I do not have time to dig into it

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.
KevinVandy added a commit that referenced this issue Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant