Incorrect range when changing lanes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 466
- Avg merge
- 2d 31m
- Merged PRs (30d)
- 13
Description
Describe the bug
From version 3.13.3 the range calculations changed in this commit.
It now returns the complete range when the lanes in useVirtualizer are changed.
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/tankstack-virtual-range-extractor-p6jf47
Steps to reproduce
- Start scrolling and the range gets updated correctly
- Toggle lanes (lanes change from 5 to 10) and the range changes to 0-9999
- Update in package.json @tanstack/react-virtual to 3.13.2
- The problem is fixed again.
Expected behavior
Ranges should be correct
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Tested in macOS, Safari and Chrome
tanstack-virtual version
3.13.9
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked minimal reproducible CodeSandbox and the useVirtualizer lanes change from 5 to 10, then compare the behavior between versions 3.13.2 and 3.13.9 and inspect commit 02ef3097de4a14ed4077ace2ca901dc411bf81c1. Done means changing lanes no longer expands the range to 0–9999 and the calculated range remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100