Open
Description
Describe the bug
Expanding an item should never move the top of the item--it should always expand downwards. However, if the scroll window occludes the top of the item, it will instead move upwards when expanded.
This issue does not occur in 3.0.0-beta.35
and earlier.
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/zen-blackburn-tnrzfr
Steps to reproduce
- Scroll down such that an item is partially occluded by the top of the scroll window
- Click on the occluded item to expand it
- Note that the top of the item jumps up and out of view
- Change the
@tanstack/react-virtual
version number to3.0.0-beta.35
and runnpm i && npm run dev
, then redo steps 1-3 and see that the item does not move
Expected behavior
As a user, I expect that expanding an item will not cause it to move.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
MacOS 13.4.1 (22F82), Chrome Version 114.0.5735.198 (Official Build) (arm64)
tanstack-virtual version
3.0.0-beta.54
TypeScript version
No response
Additional context
No response
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
Labels
No labels