react-virtualized
react-virtualized copied to clipboard
`scrollToIndex` doesn't work when `scrollTop` is set in List
Bug Report
I have to use both scroll-sync (which requires setting scrollTop) and scrollToIndex to navigate to a page, but scrollToIndex doesn't work seemingly due to scrollTop is already set by ScrollSync
Any idea?
I got it working with a hacky workaround. Used a useEffect to set scrollTop to null when scrollToIndex changes.
@aayushdutt This worked! Since i'm using WindowScroller, i ended up doing the following scrollTop={isScrolling && scrollTop}