Skip to content

scrollToIndex doesn't work correctly with dynamic height #468

@irynakashchuk

Description

@irynakashchuk

Describe the bug

Hi,

I tried setTimeout and requestAnimationFrame as was discussed in prev issue but it doesn't work.

Simple retro: https://codesandbox.io/s/busy-vaughan-5kzyme

Your minimal, reproducible example

https://codesandbox.io/s/busy-vaughan-5kzyme

Steps to reproduce

  1. Click on button "Scroll to row 250" (simple repro project)

Expected behavior

Actually, it scrolls on 117

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

OS: MacOS,
Browser: Chrome v.107.0.5304.110

tanstack-virtual version

3.0.0-beta.23

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