Skip to content

Incorrect range when changing lanes #1012

Open
@Arjan-Zuidema

Description

@Arjan-Zuidema

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

  1. Start scrolling and the range gets updated correctly
  2. Toggle lanes (lanes change from 5 to 10) and the range changes to 0-9999
  3. Update in package.json @tanstack/react-virtual to 3.13.2
  4. 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.

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