Skip to content

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

@ryanagillie

Description

@ryanagillie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions