@tanstack/virtual-core
3.19.11 · 3 Nov 2026MIT56.2M / weekRepositoryHomepagenpmAtom feed
3.19.11 is the newest release of 3.x.
In short
2 fixed
Release note
Patch Changes
Notify framework when count changes to update getTotalSize()
Fixed an issue where
getTotalSize()would return stale values when thecountoption changed (e.g., during filtering or search operations). The virtualizer now automatically notifies the framework when measurement-affecting options change, ensuring the UI updates correctly without requiring manualuseMemoworkarounds.Before: When filtering items, the list container would maintain its previous height, causing excessive blank space (when count decreased) or inaccessible items (when count increased).
After: Height updates automatically when count changes, providing the correct user experience.
This fix applies to all framework adapters and has minimal performance impact (< 0.1ms per change).
Stabilize lane assignments in masonry layout
Added lane assignment caching to prevent items from jumping between lanes when viewport is resized. Previously, items could shift to different lanes during resize due to recalculating "shortest lane" with slightly different heights.
Changes:
Added
laneAssignmentscache (Map<index, lane>) to persist lane assignmentsLane cache is cleared when
lanesoption changes ormeasure()is calledLane cache is cleaned up when
countdecreases (removes stale entries)Lane cache is cleared when virtualizer is disabled
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.