github TanStack/virtual @tanstack/virtual-core@3.17.5

latest releases: @tanstack/lit-virtual@3.13.34, @tanstack/svelte-virtual@3.13.33, @tanstack/react-virtual@3.14.7...
one day ago

Patch Changes

  • #1230 1e3b908 - Clamp the tracked scrollOffset at 0 when applying end-anchor measurement compensation and when re-anchoring in setOptions. Previously, with anchorTo: 'end' and content shorter than the viewport, items measuring smaller than their estimates drove the tracked offset negative with no scroll event to ever correct it — getDistanceFromEnd() reported a permanent phantom distance and iOS deferred measurement corrections stayed wedged forever.

  • #1235 7dcfc07 - Stop iOS-deferred scroll adjustments from replaying stale deltas after the position is already correct (#1233). On iOS WebKit the end-anchored virtualizer defers scroll compensation while the scroller is live and replays it once settled, but two cases replayed a delta whose premise no longer held:

    • Absolute scroll commands (scrollToOffset / scrollToIndex / scrollToEnd) derive their target from current measurements, so a pending deferred delta is already stale — it now invalidates the deferral instead of letting it replay and shift the list off the just-established position. Relative commands (scrollBy) keep the deferral.
    • At the end clamp with anchorTo: 'end', a row above the viewport re-measuring smaller lets the browser clamp scrollTop onto the new bottom (already the correct position); the flush now drops the stale negative compensation instead of replaying it and lifting the view off the bottom. Positive deltas still replay, since content growth above does not clamp.

Don't miss a new virtual release

NewReleases is sending notifications on new releases.