ng-virtual-list 16.9.2 → 16.9.4

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.
@@ -644,8 +644,6 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
644
644
  $measures = this._$measures.asObservable();
645
645
  _$focused = new BehaviorSubject$1(false);
646
646
  $focused = this._$focused.asObservable();
647
- _$reseted = new BehaviorSubject$1(false);
648
- $reseted = this._$reseted.asObservable();
649
647
  _$part = new BehaviorSubject$1(PART_DEFAULT_ITEM);
650
648
  $part = this._$part.asObservable();
651
649
  _$maxClickDistance = new BehaviorSubject$1(DEFAULT_CLICK_DISTANCE);
@@ -741,7 +739,7 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
741
739
  this._elementRef.nativeElement.setAttribute('id', String(this._id));
742
740
  }
743
741
  ngOnInit() {
744
- const $data = this.$data, $config = this.$config, $measures = this.$measures, $focused = this.$focused, $reseted = this.$reseted;
742
+ const $data = this.$data, $config = this.$config, $measures = this.$measures, $focused = this.$focused;
745
743
  this._service.$clickDistance.pipe(takeUntilDestroyed(this._destroyRef), tap(v => {
746
744
  this._$maxClickDistance.next(v);
747
745
  })).subscribe();
@@ -751,10 +749,10 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
751
749
  $config.pipe(takeUntilDestroyed(this._destroyRef), tap(v => {
752
750
  this._$index.next(v?.tabIndex ?? -1);
753
751
  })).subscribe();
754
- combineLatest([$data, $config, $measures, $reseted]).pipe(takeUntilDestroyed(this._destroyRef), tap(([data, config, measures, reseted]) => {
752
+ combineLatest([$data, $config, $measures]).pipe(takeUntilDestroyed(this._destroyRef), tap(([data, config, measures]) => {
755
753
  this._$templateContext.next({
756
754
  data: data?.data, prevData: data?.previouseData, nextData: data?.nextData, measures,
757
- config, reseted, index: data?.index ?? -1
755
+ config, reseted: false, index: data?.index ?? -1
758
756
  });
759
757
  })).subscribe();
760
758
  $focused.pipe(takeUntilDestroyed(this._destroyRef), tap(v => {
@@ -936,7 +934,6 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
936
934
  return { width: width > 0 ? width : 1, height: height > 0 ? height : 1, };
937
935
  }
938
936
  show() {
939
- this._$reseted.next(false);
940
937
  const el = this._elementRef.nativeElement, styles = el.style;
941
938
  styles.zIndex = this.data?.config?.zIndex ?? DEFAULT_ZINDEX;
942
939
  if (this.regular) {
@@ -953,7 +950,6 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
953
950
  }
954
951
  }
955
952
  hide() {
956
- this._$reseted.next(true);
957
953
  const el = this._elementRef.nativeElement, styles = el.style;
958
954
  styles.position = POSITION_ABSOLUTE;
959
955
  styles.transform = `${TRANSLATE_3D$1}(${this.data?.config?.isVertical ? 0 : ZEROS_POSITION},${this.data?.config?.isVertical ? 0 : ZEROS_POSITION},0)`;
@@ -1964,7 +1960,7 @@ class TrackBox extends CacheMap {
1964
1960
  * Calculates list metrics
1965
1961
  */
1966
1962
  recalculateMetrics(options) {
1967
- const { fromItemId, bounds, collection, dynamicSize, isVertical, itemSize, reversed, bufferSize: minBufferSize, scrollSize, snap, itemConfigMap, enabledBufferOptimization, previousTotalSize, crudDetected, deletedItemsMap } = options, roundedScrollSize = Math.round(scrollSize);
1963
+ const { fromItemId, bounds, collection, dynamicSize, isVertical, itemSize, bufferSize: minBufferSize, scrollSize, snap, itemConfigMap, enabledBufferOptimization, previousTotalSize, crudDetected, deletedItemsMap } = options, roundedScrollSize = Math.round(scrollSize);
1968
1964
  const trackBy = this._trackingPropertyName, bufferSize = Math.max(minBufferSize, this._bufferSize), { width, height } = bounds, sizeProperty = isVertical ? HEIGHT_PROP_NAME : WIDTH_PROP_NAME, size = isVertical ? height : width, totalLength = collection.length, typicalItemSize = itemSize, w = isVertical ? width : typicalItemSize, h = isVertical ? typicalItemSize : height, map = this._map, snapshot = this._snapshot, checkOverscrollItemsLimit = Math.ceil(typicalItemSize !== 0 ? size / typicalItemSize : 0), snippedPos = Math.floor(scrollSize) + this._scrollStartOffset, leftItemsWeights = [], isFromId = fromItemId !== undefined && (typeof fromItemId === 'number' && fromItemId > -1)
1969
1965
  || (typeof fromItemId === 'string' && fromItemId > '-1');
1970
1966
  let leftItemsOffset = 0, rightItemsOffset = 0;
@@ -2235,7 +2231,6 @@ class TrackBox extends CacheMap {
2235
2231
  totalSize,
2236
2232
  typicalItemSize,
2237
2233
  isFromItemIdFound,
2238
- reversed: options.reversed,
2239
2234
  isUpdating,
2240
2235
  };
2241
2236
  return metrics;
@@ -2253,7 +2248,7 @@ class TrackBox extends CacheMap {
2253
2248
  this.bumpVersion();
2254
2249
  }
2255
2250
  generateDisplayCollection(items, itemConfigMap, metrics) {
2256
- const { offsetY, offsetX, width, height, normalizedItemWidth, normalizedItemHeight, dynamicSize, itemsOnDisplayLength, itemsFromStartToScrollEnd, isVertical, renderItems: renderItemsLength, scrollSize, sizeProperty, snap, snippedPos, startPosition, totalLength, startIndex, typicalItemSize, reversed, } = metrics, displayItems = [];
2251
+ const { offsetY, offsetX, width, height, normalizedItemWidth, normalizedItemHeight, dynamicSize, itemsOnDisplayLength, itemsFromStartToScrollEnd, isVertical, renderItems: renderItemsLength, scrollSize, sizeProperty, snap, snippedPos, startPosition, totalLength, startIndex, typicalItemSize, } = metrics, displayItems = [];
2257
2252
  if (items.length) {
2258
2253
  const trackBy = this._trackingPropertyName, actualSnippedPosition = snippedPos, isSnappingMethodAdvanced = this.isSnappingMethodAdvanced, boundsSize = isVertical ? height : width, actualEndSnippedPosition = scrollSize + boundsSize - this._scrollEndOffset, positionOffset = isVertical ? offsetY : offsetX;
2259
2254
  let pos = startPosition, renderItems = renderItemsLength, stickyItem, nextSticky, stickyItemIndex = -1, stickyItemSize = 0, endStickyItem, nextEndSticky, endStickyItemIndex = -1, endStickyItemSize = 0, count = 1;
@@ -2369,7 +2364,7 @@ class TrackBox extends CacheMap {
2369
2364
  if (iterations > totalLength || i >= totalLength) {
2370
2365
  break;
2371
2366
  }
2372
- const collectionItem = items[reversed ? (items.length - i + 1) : i];
2367
+ const collectionItem = items[i];
2373
2368
  if (!collectionItem) {
2374
2369
  continue;
2375
2370
  }
@@ -3981,11 +3976,11 @@ class NgScrollerComponent {
3981
3976
  }
3982
3977
  }
3983
3978
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgScrollerComponent, deps: [{ token: NgVirtualListService }], target: i0.ɵɵFactoryTarget.Component });
3984
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NgScrollerComponent, selector: "ng-scroller", inputs: { direction: "direction", focusedElement: "focusedElement", loading: "loading", classes: "classes", startOffset: "startOffset", endOffset: "endOffset", scrollbarTheme: "scrollbarTheme", scrollbarMinSize: "scrollbarMinSize" }, viewQueries: [{ propertyName: "scrollContent", first: true, predicate: ["scrollContent"], descendants: true }, { propertyName: "cdkScrollable", first: true, predicate: ["scrollViewport"], descendants: true, read: CdkScrollable }, { propertyName: "scrollBar", first: true, predicate: ["scrollBar"], descendants: true, read: NgScrollBarComponent }, { propertyName: "scrollViewport", first: true, predicate: ["scrollViewport"], descendants: true }], ngImport: i0, template: "<div localeSensitive [langTextDir]=\"($langTextDir | async)!\" [listDir]=\"($direction | async)!\" class=\"ngvl__container\"\r\n [ngClass]=\"($containerClasses | async)!\">\r\n <div #scrollViewport cdkScrollable part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent [attr.aria-orientation]=\"($direction | async)!\"\r\n [attr.aria-activedescendant]=\"$focusedElement | async\" tabindex=\"0\" part=\"list\" class=\"ngvl__list\"\r\n [ngClass]=\"($actualClasses | async)!\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <ng-scroll-bar #scrollBar [isVertical]=\"($isVertical | async)!\" [size]=\"($thumbSize | async)!\"\r\n [theme]=\"($scrollbarTheme | async)!\" [position]=\"($thumbPosition | async)!\"\r\n [thumbGradientPositions]=\"($thumbGradientPositions | async)!\" [loading]=\"($loading | async)!\"\r\n [prepared]=\"($preparedSignal | async)!\" [show]=\"($thumbShow | async)!\"\r\n (onDrag)=\"onScrollBarDragHandler($event)\"></ng-scroll-bar>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100%;opacity:0}.ngvl__list.prepared{opacity:1;overflow:hidden}.ngvl__list.prepared.wait-for-preparation{transition:opacity .15s ease-out .1s}.ngvl__list.ready-to-start{transition:height .15s ease-out}.ngvl__list.ready-to-start.wait-for-preparation{transition:height .15s ease-out,opacity .15s ease-out .1s}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgScrollBarComponent, selector: "ng-scroll-bar", inputs: ["loading", "isVertical", "position", "thumbGradientPositions", "size", "theme", "prepared", "show"], outputs: ["onDrag"] }, { kind: "directive", type: LocaleSensitiveDirective, selector: "[localeSensitive]", inputs: ["langTextDir", "listDir"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3979
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NgScrollerComponent, selector: "ng-scroller", inputs: { direction: "direction", focusedElement: "focusedElement", loading: "loading", classes: "classes", startOffset: "startOffset", endOffset: "endOffset", scrollbarTheme: "scrollbarTheme", scrollbarMinSize: "scrollbarMinSize" }, viewQueries: [{ propertyName: "scrollContent", first: true, predicate: ["scrollContent"], descendants: true }, { propertyName: "cdkScrollable", first: true, predicate: ["scrollViewport"], descendants: true, read: CdkScrollable }, { propertyName: "scrollBar", first: true, predicate: ["scrollBar"], descendants: true, read: NgScrollBarComponent }, { propertyName: "scrollViewport", first: true, predicate: ["scrollViewport"], descendants: true }], ngImport: i0, template: "<div localeSensitive [langTextDir]=\"($langTextDir | async)!\" [listDir]=\"($direction | async)!\" class=\"ngvl__container\"\r\n [ngClass]=\"($containerClasses | async)!\">\r\n <div #scrollViewport cdkScrollable part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent [attr.aria-orientation]=\"($direction | async)!\"\r\n [attr.aria-activedescendant]=\"$focusedElement | async\" tabindex=\"0\" part=\"list\" class=\"ngvl__list\"\r\n [ngClass]=\"($actualClasses | async)!\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <ng-scroll-bar #scrollBar [isVertical]=\"($isVertical | async)!\" [size]=\"($thumbSize | async)!\"\r\n [theme]=\"($scrollbarTheme | async)!\" [position]=\"($thumbPosition | async)!\"\r\n [thumbGradientPositions]=\"($thumbGradientPositions | async)!\" [loading]=\"($loading | async)!\"\r\n [prepared]=\"($preparedSignal | async)!\" [show]=\"($thumbShow | async)!\"\r\n (onDrag)=\"onScrollBarDragHandler($event)\"></ng-scroll-bar>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100%}.ngvl__list.prepared{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgScrollBarComponent, selector: "ng-scroll-bar", inputs: ["loading", "isVertical", "position", "thumbGradientPositions", "size", "theme", "prepared", "show"], outputs: ["onDrag"] }, { kind: "directive", type: LocaleSensitiveDirective, selector: "[localeSensitive]", inputs: ["langTextDir", "listDir"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3985
3980
  }
3986
3981
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgScrollerComponent, decorators: [{
3987
3982
  type: Component,
3988
- args: [{ selector: 'ng-scroller', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div localeSensitive [langTextDir]=\"($langTextDir | async)!\" [listDir]=\"($direction | async)!\" class=\"ngvl__container\"\r\n [ngClass]=\"($containerClasses | async)!\">\r\n <div #scrollViewport cdkScrollable part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent [attr.aria-orientation]=\"($direction | async)!\"\r\n [attr.aria-activedescendant]=\"$focusedElement | async\" tabindex=\"0\" part=\"list\" class=\"ngvl__list\"\r\n [ngClass]=\"($actualClasses | async)!\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <ng-scroll-bar #scrollBar [isVertical]=\"($isVertical | async)!\" [size]=\"($thumbSize | async)!\"\r\n [theme]=\"($scrollbarTheme | async)!\" [position]=\"($thumbPosition | async)!\"\r\n [thumbGradientPositions]=\"($thumbGradientPositions | async)!\" [loading]=\"($loading | async)!\"\r\n [prepared]=\"($preparedSignal | async)!\" [show]=\"($thumbShow | async)!\"\r\n (onDrag)=\"onScrollBarDragHandler($event)\"></ng-scroll-bar>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100%;opacity:0}.ngvl__list.prepared{opacity:1;overflow:hidden}.ngvl__list.prepared.wait-for-preparation{transition:opacity .15s ease-out .1s}.ngvl__list.ready-to-start{transition:height .15s ease-out}.ngvl__list.ready-to-start.wait-for-preparation{transition:height .15s ease-out,opacity .15s ease-out .1s}\n"] }]
3983
+ args: [{ selector: 'ng-scroller', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div localeSensitive [langTextDir]=\"($langTextDir | async)!\" [listDir]=\"($direction | async)!\" class=\"ngvl__container\"\r\n [ngClass]=\"($containerClasses | async)!\">\r\n <div #scrollViewport cdkScrollable part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent [attr.aria-orientation]=\"($direction | async)!\"\r\n [attr.aria-activedescendant]=\"$focusedElement | async\" tabindex=\"0\" part=\"list\" class=\"ngvl__list\"\r\n [ngClass]=\"($actualClasses | async)!\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <ng-scroll-bar #scrollBar [isVertical]=\"($isVertical | async)!\" [size]=\"($thumbSize | async)!\"\r\n [theme]=\"($scrollbarTheme | async)!\" [position]=\"($thumbPosition | async)!\"\r\n [thumbGradientPositions]=\"($thumbGradientPositions | async)!\" [loading]=\"($loading | async)!\"\r\n [prepared]=\"($preparedSignal | async)!\" [show]=\"($thumbShow | async)!\"\r\n (onDrag)=\"onScrollBarDragHandler($event)\"></ng-scroll-bar>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100%}.ngvl__list.prepared{overflow:hidden}\n"] }]
3989
3984
  }], ctorParameters: function () { return [{ type: NgVirtualListService }]; }, propDecorators: { scrollContent: [{
3990
3985
  type: ViewChild,
3991
3986
  args: ['scrollContent']
@@ -5123,27 +5118,27 @@ class NgVirtualListComponent {
5123
5118
  })).subscribe();
5124
5119
  let prepared = false, readyToStart = false, isUserScrolling = false;
5125
5120
  this.$prepared.pipe(takeUntilDestroyed(), distinctUntilChanged(), tap(v => {
5126
- const waitForPreparation = this._$waitForPreparation.getValue();
5127
- if (waitForPreparation) {
5128
- if (!v) {
5129
- prepared = readyToStart = v;
5121
+ if (!v) {
5122
+ this.cacheClean();
5123
+ readyToStart = isUserScrolling = false;
5124
+ prepared = readyToStart = v;
5125
+ const waitForPreparation = this._$waitForPreparation.getValue();
5126
+ if (waitForPreparation) {
5130
5127
  const scrollerComponent = this._scrollerComponent;
5131
5128
  if (scrollerComponent) {
5132
5129
  scrollerComponent.prepared = v;
5133
5130
  }
5134
5131
  this._$classes.next({ prepared: v, [WAIT_FOR_PREPARATION]: waitForPreparation });
5135
- this.cacheClean();
5136
5132
  }
5137
- }
5138
- else {
5139
- prepared = readyToStart = true;
5140
- const scrollerComponent = this._scrollerComponent;
5141
- if (scrollerComponent) {
5142
- scrollerComponent.prepared = true;
5133
+ else {
5134
+ const scrollerComponent = this._scrollerComponent;
5135
+ if (scrollerComponent) {
5136
+ scrollerComponent.prepared = true;
5137
+ }
5138
+ this._$classes.next({ prepared: true, [READY_TO_START]: true, [WAIT_FOR_PREPARATION]: waitForPreparation });
5143
5139
  }
5144
- this._$classes.next({ prepared: true, [READY_TO_START]: true, [WAIT_FOR_PREPARATION]: waitForPreparation });
5145
5140
  }
5146
- }), filter$1(v => !!v), debounceTime(0), takeUntilDestroyed(), tap(v => {
5141
+ }), filter$1(v => !!v), delay(0), takeUntilDestroyed(), tap(v => {
5147
5142
  prepared = v;
5148
5143
  }), delay(0), takeUntilDestroyed(), tap(v => {
5149
5144
  const waitForPreparation = this._$waitForPreparation.getValue(), scrollerComponent = this._scrollerComponent, val = v || !waitForPreparation;
@@ -5302,14 +5297,11 @@ class NgVirtualListComponent {
5302
5297
  const { width, height, x, y } = bounds, viewportSize = (isVertical ? height : width);
5303
5298
  let scrollLength = Math.round(this._$totalSize.getValue()) ?? 0, actualScrollLength = Math.round(scrollLength === 0 ? 0 : scrollLength > viewportSize ? scrollLength - viewportSize : scrollLength), roundedMaxPosition = Math.round(actualScrollLength), scrollPosition = Math.round(actualScrollSize);
5304
5299
  const opts = {
5305
- bounds: { width, height, x, y }, dynamicSize, isVertical, itemSize, reversed: false,
5300
+ bounds: { width, height, x, y }, dynamicSize, isVertical, itemSize,
5306
5301
  bufferSize, maxBufferSize, scrollSize: actualScrollSize, snap, enabledBufferOptimization,
5307
5302
  };
5308
- if (snapScrollToBottom && scrollLength > viewportSize && !prepared) {
5309
- const { totalSize: calculatedTotalSize } = this._trackBox.getMetrics(items, itemConfigMap, { ...opts, reversed: true });
5310
- totalSize = calculatedTotalSize;
5311
- actualScrollSize = (totalSize > viewportSize ? totalSize - viewportSize : 0);
5312
- const { displayItems: calculatedDisplayItems, totalSize: calculatedTotalSize1 } = this._trackBox.updateCollection(items, itemConfigMap, { ...opts, reversed: true, scrollSize: actualScrollSize });
5303
+ if (snapScrollToBottom && !prepared) {
5304
+ const { displayItems: calculatedDisplayItems, totalSize: calculatedTotalSize1 } = this._trackBox.updateCollection(items, itemConfigMap, { ...opts, scrollSize: actualScrollSize });
5313
5305
  displayItems = calculatedDisplayItems;
5314
5306
  totalSize = calculatedTotalSize1;
5315
5307
  scrollLength = Math.round(totalSize) ?? 0;
@@ -5515,7 +5507,7 @@ class NgVirtualListComponent {
5515
5507
  if (dynamicSize) {
5516
5508
  const { width, height, x, y } = this._$bounds.getValue() || { x: 0, y: 0, width: DEFAULT_LIST_SIZE, height: DEFAULT_LIST_SIZE }, itemConfigMap = this._$itemConfigMap.getValue(), items = this._$actualItems.getValue(), isVertical = this._isVertical, currentScollSize = (isVertical ? scrollerComponent.scrollTop : scrollerComponent.scrollLeft), delta = this._trackBox.delta, opts = {
5517
5509
  bounds: { width, height, x, y }, collection: items, dynamicSize, isVertical: this._isVertical, itemSize,
5518
- bufferSize: this._$bufferSize.getValue(), maxBufferSize: this._$maxBufferSize.getValue(), reversed: false,
5510
+ bufferSize: this._$bufferSize.getValue(), maxBufferSize: this._$maxBufferSize.getValue(),
5519
5511
  scrollSize: (isVertical ? scrollerComponent.scrollTop : scrollerComponent.scrollLeft) + delta,
5520
5512
  snap: this._$snap.getValue(), fromItemId: id, enabledBufferOptimization: this._$enabledBufferOptimization.getValue(),
5521
5513
  }, scrollSize = this._trackBox.getItemPosition(id, itemConfigMap, opts), params = {
@@ -5815,6 +5807,7 @@ class NgVirtualListComponent {
5815
5807
  if (scrollerComponent) {
5816
5808
  scrollerComponent.reset();
5817
5809
  }
5810
+ this._$prepared.next(false);
5818
5811
  }
5819
5812
  stopSnappingScrollToEnd() {
5820
5813
  const scroller = this._scrollerComponent;