virtual icon indicating copy to clipboard operation
virtual copied to clipboard

Fix `initialOffset` not working

Open christiankaindl opened this issue 2 years ago • 0 comments

Explicitly scroll to the correct offset.

The range was initially calculated correctly, but the scroll position of scrollElement was 0 (which causes the range to be re-calculated to match the visible area). The same applies for SSR usage: the scroll position cannot be transmitted from the server, so it needs to be restored explicitly on the client.

Note: Needs to be tested with a SSR setup Fixes https://github.com/TanStack/virtual/issues/346

christiankaindl avatar Jul 30 '22 12:07 christiankaindl