v10.3.0
- Added support for
filterAnnotationsprop inPagecomponent (#1991). - Made the code more resilient to promise cancellations (#974).
- Tests are no longer shipped to npm. This helped reducing publish size from 416 kB to 303 kB.
- Updated Next.js samples.
- Fixed incorrectly calculated dimensions of rotated pages in Page onLoadSuccess handler (#2027). Thanks, @wkirby!
@tanstack/svelte-virtual@3.13.14
- Updated dependencies [
6d9274c]:- @tanstack/virtual-core@3.13.14
@tanstack/solid-virtual@3.13.14
- Updated dependencies [
6d9274c]:- @tanstack/virtual-core@3.13.14
@tanstack/vue-virtual@3.13.14
- Updated dependencies [
6d9274c]:- @tanstack/virtual-core@3.13.14
@tanstack/virtual-core@3.13.14
-
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
initialMeasurementsCacherestoration during lane transitions by checking thelanesSettlingflag. 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/react-virtual@3.13.14
- Updated dependencies [
6d9274c]:- @tanstack/virtual-core@3.13.14
@tanstack/lit-virtual@3.13.15
- Updated dependencies [
6d9274c]:- @tanstack/virtual-core@3.13.14