bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.72k stars 782 forks source link

【Bug】Change container width, wrong scroll position #636

Closed Veath closed 3 weeks ago

Veath commented 2 years ago

Demo - link

Steps to reproduce

1.Drag the right iframe width to the minimum 2.Then Scroll the list to the very bottom 3.Then make the iframe window bigger, about 1200px 4.Scroll up the list and watch the subscripts of each item index in the list

Question

When scrolling up, the position is incorrect。

eg,

Row index 100 // this is incorrect item
Row index 98
Row index 99
Row index 100

Expect

I hope that when scrolling up, each item can be displayed normally eg,

Row index 97
Row index 98
Row index 99
Row index 100
Veath commented 2 years ago

https://user-images.githubusercontent.com/15187953/163562576-981df27a-0bbb-4961-b681-786aa6fdadd2.mp4