Skip to content

Releases: TanStack/virtual

@tanstack/vue-virtual@3.13.14

30 Dec 18:08
a1d0043

Choose a tag to compare

Patch Changes

  • Updated dependencies [6d9274c]:
    • @tanstack/virtual-core@3.13.14

@tanstack/virtual-core@3.13.14

30 Dec 18:08
a1d0043

Choose a tag to compare

Patch Changes

  • Fix: Correct lane assignments when lane count changes dynamically (#1095)

    Fixed a critical bug where changing the number of lanes dynamically would cause layout breakage with incorrect lane assignments. When the lane count changed (e.g., from 3 to 2 columns in a responsive masonry layout), some virtual items would retain their old lane numbers, causing out-of-bounds errors and broken layouts.

    Root Cause: After clearing measurements cache on lane change, the virtualizer was incorrectly restoring data from initialMeasurementsCache, which contained stale lane assignments from the previous lane count.

    Fix: Skip initialMeasurementsCache restoration during lane transitions by checking the lanesSettling flag. This ensures all measurements are recalculated with correct lane assignments for the new lane count.

    Before:

    // With lanes = 2
    virtualItems.forEach((item) => {
      columns[item.lane].push(item) // ❌ Error: item.lane could be 3
    })

    After:

    // With lanes = 2
    virtualItems.forEach((item) => {
      columns[item.lane].push(item) // ✅ item.lane is always 0 or 1
    })

    This fix is essential for responsive masonry layouts where column count changes based on viewport width. No performance impact as it only affects the lane change transition path.

@tanstack/svelte-virtual@3.13.14

30 Dec 18:08
a1d0043

Choose a tag to compare

Patch Changes

  • Updated dependencies [6d9274c]:
    • @tanstack/virtual-core@3.13.14

@tanstack/solid-virtual@3.13.14

30 Dec 18:08
a1d0043

Choose a tag to compare

Patch Changes

  • Updated dependencies [6d9274c]:
    • @tanstack/virtual-core@3.13.14

@tanstack/react-virtual@3.13.14

30 Dec 18:08
a1d0043

Choose a tag to compare

Patch Changes

  • Updated dependencies [6d9274c]:
    • @tanstack/virtual-core@3.13.14

@tanstack/lit-virtual@3.13.15

30 Dec 18:08
a1d0043

Choose a tag to compare

Patch Changes

  • Updated dependencies [6d9274c]:
    • @tanstack/virtual-core@3.13.14

@tanstack/angular-virtual@4.0.2

30 Dec 18:08
a1d0043

Choose a tag to compare

Patch Changes

  • Updated dependencies [6d9274c]:
    • @tanstack/virtual-core@3.13.14

@tanstack/vue-virtual@3.13.13

08 Dec 07:53
de8c12f

Choose a tag to compare

Patch Changes

  • Fix: Notify framework when count changes to update getTotalSize() (#1085)

    Fixed an issue where getTotalSize() would return stale values when the count option 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 manual useMemo workarounds.

    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).

  • Updated dependencies [2542c5a, 96e32a6]:

    • @tanstack/virtual-core@3.13.13

@tanstack/virtual-core@3.13.13

08 Dec 07:53
de8c12f

Choose a tag to compare

Patch Changes

  • Fix: Notify framework when count changes to update getTotalSize() (#1085)

    Fixed an issue where getTotalSize() would return stale values when the count option 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 manual useMemo workarounds.

    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).

  • fix: stabilize lane assignments in masonry layout (#1080)

    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 laneAssignments cache (Map<index, lane>) to persist lane assignments
    • Lane cache is cleared when lanes option changes or measure() is called
    • Lane cache is cleaned up when count decreases (removes stale entries)
    • Lane cache is cleared when virtualizer is disabled

@tanstack/svelte-virtual@3.13.13

08 Dec 07:53
de8c12f

Choose a tag to compare

Patch Changes

  • Fix: Notify framework when count changes to update getTotalSize() (#1085)

    Fixed an issue where getTotalSize() would return stale values when the count option 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 manual useMemo workarounds.

    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).

  • Updated dependencies [2542c5a, 96e32a6]:

    • @tanstack/virtual-core@3.13.13