petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.25k stars 301 forks source link

V1) initialTopMostItemIndex change from 0 to 1 makes list go empty #223

Closed chrisdostert closed 3 years ago

chrisdostert commented 3 years ago

Repro steps:

  1. open https://stackblitz.com/edit/react-l1eibb-ghmdzz?file=ExampleComponents.js
  2. click add item
  3. click add item

Expected Second iteme added to both non-virtualized and virtualized list

Actual virtualized list goes blank

Note: if you remove initialTopMostItemIndex entirely it works.

chrisdostert commented 3 years ago

possibly related to https://github.com/petyosi/react-virtuoso/issues/176

petyosi commented 3 years ago

@chrisdostert thank you for the test case, resolved. I am about to release v1 over the weekend, so I will not publish a new beta for that.