Describe the bug
Using GroupedVirtuoso with initialTopMostItemIndex (or scrollToIndex) to an item that is not the first of the group and the items change size (like loading server side data) causes the intended top item to shift position.
Since the heights are random a reload might be necessary.
Expected behavior
The item 40003 should be at the top even after the content load.
Screenshots
Desktop (please complete the following information):
OS: macOS.
Browser: chrome.
Additional context
My guess is that when an item is at the top and it is not the first of the group the previous item is actually hidden behind the group at the top. And probably being mistaken for the top item, then when it resizes it moves the intended top item.
Describe the bug Using
GroupedVirtuoso
withinitialTopMostItemIndex
(orscrollToIndex
) to an item that is not the first of the group and the items change size (like loading server side data) causes the intended top item to shift position.Reproduction sandbox
To Reproduce Steps to reproduce the behaviour:
Expected behavior The item 40003 should be at the top even after the content load.
Screenshots![image](https://github.com/petyosi/react-virtuoso/assets/8060611/5c3c0132-db71-4484-bd13-efc4e233468e)
Desktop (please complete the following information):
Additional context My guess is that when an item is at the top and it is not the first of the group the previous item is actually hidden behind the group at the top. And probably being mistaken for the top item, then when it resizes it moves the intended top item.