Skip to content

When scrolling to the bottom item via scrollToIndex during initial rendering, it does not scroll all the way to the bottom. #438

Description

@raccoon-ccoder

Problem

  • When rendering a list with 1000 elements, the following problem occurs:
  • When scrolling to the bottom elements (ex: 990~998) through scrollToIndex, it does not scroll to the bottom.
  • This problem only occurs if you manipulate scrollToIndex immediately after the initial rendering.
  • If I access the bottom element via scrollToIndex after a bit of scrolling after the initial render, it works fine.

The example code below will scroll to the 998th element out of 1000 when the button is clicked.
Scrolling to the middle element via scrollToIndex works fine, but scrolling to the bottom element doesn't work properly. I don't know why
https://codesandbox.io/p/sandbox/live-demo-virtual-list-forked-d3s7nw?file=%2Fsrc%2Fdata.js%3A12%2C18

This is a test video for example.

2025-07-21.4.21.55.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions