@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/esm/index.js CHANGED
@@ -239,6 +239,7 @@ class Virtualizer {
239
239
  }
240
240
  this._flushHoldIfReady(true);
241
241
  this._writeAwaitingCommand();
242
+ this._retryClampedAdjustment();
242
243
  }
243
244
  });
244
245
  this._lastElementOffset = null;
@@ -617,7 +618,7 @@ class Virtualizer {
617
618
  });
618
619
  };
619
620
  this._retryClampedAdjustment = () => {
620
- if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled) {
621
+ if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled || !this._canWriteScroll()) {
621
622
  return;
622
623
  }
623
624
  const { target, maxAtWrite } = this._clampedAdjustment;
@@ -1485,6 +1486,8 @@ class Virtualizer {
1485
1486
  // scroll as landed; an offset target never does, so its first scroll
1486
1487
  // event is read as the user's (see the scroll handler in `_willUpdate`).
1487
1488
  _startScroll(target, offset, behavior, kind) {
1489
+ this.pendingScrollAnchor = null;
1490
+ this._clampedAdjustment = null;
1488
1491
  const tail = this._iosGesture.tail();
1489
1492
  if (kind === "absolute" && tail !== null) {
1490
1493
  if (tail === "fling" && iosMomentumOverridesWrites()) {