@tanstack/virtual-core 3.19.6 → 3.19.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +4 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +13 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -240,6 +240,7 @@ class Virtualizer {
|
|
|
240
240
|
}
|
|
241
241
|
this._flushHoldIfReady(true);
|
|
242
242
|
this._writeAwaitingCommand();
|
|
243
|
+
this._retryClampedAdjustment();
|
|
243
244
|
}
|
|
244
245
|
});
|
|
245
246
|
this._lastElementOffset = null;
|
|
@@ -618,7 +619,7 @@ class Virtualizer {
|
|
|
618
619
|
});
|
|
619
620
|
};
|
|
620
621
|
this._retryClampedAdjustment = () => {
|
|
621
|
-
if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled) {
|
|
622
|
+
if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled || !this._canWriteScroll()) {
|
|
622
623
|
return;
|
|
623
624
|
}
|
|
624
625
|
const { target, maxAtWrite } = this._clampedAdjustment;
|
|
@@ -1486,6 +1487,8 @@ class Virtualizer {
|
|
|
1486
1487
|
// scroll as landed; an offset target never does, so its first scroll
|
|
1487
1488
|
// event is read as the user's (see the scroll handler in `_willUpdate`).
|
|
1488
1489
|
_startScroll(target, offset, behavior, kind) {
|
|
1490
|
+
this.pendingScrollAnchor = null;
|
|
1491
|
+
this._clampedAdjustment = null;
|
|
1489
1492
|
const tail = this._iosGesture.tail();
|
|
1490
1493
|
if (kind === "absolute" && tail !== null) {
|
|
1491
1494
|
if (tail === "fling" && iosGesture.iosMomentumOverridesWrites()) {
|