You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
getTotalSize reports a negative value for empty list when scrollMargin is set #827
On the code pen, click the "0 rows" button to observe the negative value from getTotalSize(). Switching between valid values, you can see that the scrollbar updates. The element remains the last height returned from getTotalSize() because the negative height value is invalid.
Expected behavior
When there are elements, the scrollMargin is included in the measurements and getTotalSize subtracts it back out. When there are no elements, subtracting it out results in a negative value.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Chrome Windows
tanstack-virtual version
3.10.6
TypeScript version
5.5.3
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.
Activity