TanStackT
TanStack3y ago
1 reply
standard-azure

Scroll on initial render?

Hello there I am having troubles using the scrollToIndex function of the virtual library on initial render. I put the scrollToIndex in a useEffect so that when the component is rendered I scroll to the last selected item. Is this currently possible. If I put a delay to the scrollToIndex function in the useEffect. For example 200ms it does scroll to the desired index after the timeout.
Was this page helpful?