@tanstack/virtual-core
Advanced tools
@@ -857,9 +857,9 @@ "use strict"; | ||
| ) : ( | ||
| // Default: adjust scrollTop only when the resize is an above- | ||
| // viewport item AND we're not actively scrolling backward. | ||
| // Adjusting during backward scroll fights the user's scroll | ||
| // direction and produces the "items jump while scrolling up" | ||
| // jank reported across many issues. Users who want the old | ||
| // behavior can pass shouldAdjustScrollPositionOnItemSizeChange. | ||
| itemStart < this.getScrollOffset() + this.scrollAdjustments && this.scrollDirection !== "backward" | ||
| // Default: adjust when the resize is an above-viewport item. | ||
| // First measurement (!has(key)): always adjust — the item | ||
| // has never been sized, so the estimate→actual delta must | ||
| // be compensated regardless of scroll direction. | ||
| // Re-measurement (has(key)): skip during backward scroll | ||
| // to avoid the "items jump while scrolling up" cascade. | ||
| itemStart < this.getScrollOffset() + this.scrollAdjustments && (!this.itemSizeCache.has(key) || this.scrollDirection !== "backward") | ||
| )); | ||
@@ -866,0 +866,0 @@ if (this.pendingMin === null || index < this.pendingMin) { |
@@ -855,9 +855,9 @@ import { createLazyMeasurementsView } from "./lazy-measurements.js"; | ||
| ) : ( | ||
| // Default: adjust scrollTop only when the resize is an above- | ||
| // viewport item AND we're not actively scrolling backward. | ||
| // Adjusting during backward scroll fights the user's scroll | ||
| // direction and produces the "items jump while scrolling up" | ||
| // jank reported across many issues. Users who want the old | ||
| // behavior can pass shouldAdjustScrollPositionOnItemSizeChange. | ||
| itemStart < this.getScrollOffset() + this.scrollAdjustments && this.scrollDirection !== "backward" | ||
| // Default: adjust when the resize is an above-viewport item. | ||
| // First measurement (!has(key)): always adjust — the item | ||
| // has never been sized, so the estimate→actual delta must | ||
| // be compensated regardless of scroll direction. | ||
| // Re-measurement (has(key)): skip during backward scroll | ||
| // to avoid the "items jump while scrolling up" cascade. | ||
| itemStart < this.getScrollOffset() + this.scrollAdjustments && (!this.itemSizeCache.has(key) || this.scrollDirection !== "backward") | ||
| )); | ||
@@ -864,0 +864,0 @@ if (this.pendingMin === null || index < this.pendingMin) { |
+1
-1
| { | ||
| "name": "@tanstack/virtual-core", | ||
| "version": "3.17.0", | ||
| "version": "3.17.1", | ||
| "description": "Headless UI for virtualizing scrollable elements in TS/JS + Frameworks", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
+8
-7
@@ -1522,10 +1522,11 @@ import { createLazyMeasurementsView } from './lazy-measurements' | ||
| ) | ||
| : // Default: adjust scrollTop only when the resize is an above- | ||
| // viewport item AND we're not actively scrolling backward. | ||
| // Adjusting during backward scroll fights the user's scroll | ||
| // direction and produces the "items jump while scrolling up" | ||
| // jank reported across many issues. Users who want the old | ||
| // behavior can pass shouldAdjustScrollPositionOnItemSizeChange. | ||
| : // Default: adjust when the resize is an above-viewport item. | ||
| // First measurement (!has(key)): always adjust — the item | ||
| // has never been sized, so the estimate→actual delta must | ||
| // be compensated regardless of scroll direction. | ||
| // Re-measurement (has(key)): skip during backward scroll | ||
| // to avoid the "items jump while scrolling up" cascade. | ||
| itemStart < this.getScrollOffset() + this.scrollAdjustments && | ||
| this.scrollDirection !== 'backward') | ||
| (!this.itemSizeCache.has(key) || | ||
| this.scrollDirection !== 'backward')) | ||
@@ -1532,0 +1533,0 @@ if (this.pendingMin === null || index < this.pendingMin) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
378495
0.04%4767
0.02%