react-virtual-list icon indicating copy to clipboard operation
react-virtual-list copied to clipboard

Restore scroll position on navigation

Open mmontag opened this issue 3 years ago • 0 comments

What's the best way to restore scroll position on navigation back/forward with this library?

Would it be a matter of setting options.initialState.firstItemIndex, or storing position somewhere and calling the DOM API element.scrollTo(x, y)?

I am using React router for client-side navigation. (Their notes on scroll restoration: https://reactrouter.com/web/guides/scroll-restoration)

mmontag avatar Apr 22 '21 20:04 mmontag