I'm working with react-virtualized, and trying to use the scrollToIndex feature, but I get an empty list when using it. (If I scroll, then my list show again).
Here is my code:
<WindowScroller>
{({ height, isScrolling, scrollTop }) => (
<AutoSizer disableHeight>
{({ width }) => (
<List
autoHeight
height={height}
rowCount={lines.length}
rowRenderer={({ index, key, style }) => rowRenderer({ index, isScrolling, key, style, lines, onDelete, toggle })}
rowHeight={145}
scrollTop={scrollTop}
scrollToIndex={100}
width={width}
/>
)}
</AutoSizer>
)}
</WindowScroller>
If I remove scrollToIndex={100}, everything works fine.
Does scrollToIndex works with WindowScroller? because I only found example of it with List