@shival99/z-ui 1.7.13 → 1.7.14

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.
@@ -3166,6 +3166,14 @@ class ZTableComponent {
3166
3166
  overscan: virtual.overscan ?? Z_DEFAULT_VIRTUAL_OVERSCAN,
3167
3167
  groupSize: virtual.groupSize ?? Z_DEFAULT_GROUP_SIZE,
3168
3168
  dynamicSize: virtual.dynamicSize ?? false,
3169
+ // TanStack Virtual options
3170
+ initialOffset: virtual.initialOffset,
3171
+ scrollMargin: virtual.scrollMargin,
3172
+ gap: virtual.gap,
3173
+ isScrollingResetDelay: virtual.isScrollingResetDelay,
3174
+ useScrollendEvent: virtual.useScrollendEvent,
3175
+ getItemKey: virtual.getItemKey,
3176
+ rangeExtractor: virtual.rangeExtractor,
3169
3177
  };
3170
3178
  }, ...(ngDevMode ? [{ debugName: "_virtualConfig" }] : []));
3171
3179
  virtualRowHeight = computed(() => this._virtualConfig().size ?? Z_DEFAULT_ROW_HEIGHT, ...(ngDevMode ? [{ debugName: "virtualRowHeight" }] : []));
@@ -3549,12 +3557,12 @@ class ZTableComponent {
3549
3557
  }, ...(ngDevMode ? [{ debugName: "_virtualGroupCount" }] : []));
3550
3558
  _virtualResetVersion = signal(0, ...(ngDevMode ? [{ debugName: "_virtualResetVersion" }] : []));
3551
3559
  virtualizer = injectVirtualizer(() => {
3552
- // Track reset version to force virtualizer re-initialization
3553
3560
  this._virtualResetVersion();
3554
3561
  const groups = this.dynamicGroups();
3555
3562
  const rowHeight = this.virtualRowHeight();
3556
3563
  const groupSize = this.groupSize();
3557
3564
  const scrollElement = this.tbodyWrapper()?.nativeElement;
3565
+ const virtualConfig = this._virtualConfig();
3558
3566
  return {
3559
3567
  scrollElement,
3560
3568
  count: groups.length > 0 ? groups.length : this._virtualGroupCount(),
@@ -3569,8 +3577,16 @@ class ZTableComponent {
3569
3577
  return groupSize * rowHeight;
3570
3578
  },
3571
3579
  measureElement: (element) => element.getBoundingClientRect().height,
3572
- overscan: this._virtualConfig().overscan ?? Z_DEFAULT_VIRTUAL_OVERSCAN,
3573
- initialOffset: 0,
3580
+ overscan: virtualConfig.overscan ?? Z_DEFAULT_VIRTUAL_OVERSCAN,
3581
+ initialOffset: virtualConfig.initialOffset ?? 0,
3582
+ ...(virtualConfig.scrollMargin !== undefined && { scrollMargin: virtualConfig.scrollMargin }),
3583
+ ...(virtualConfig.gap !== undefined && { gap: virtualConfig.gap }),
3584
+ ...(virtualConfig.isScrollingResetDelay !== undefined && {
3585
+ isScrollingResetDelay: virtualConfig.isScrollingResetDelay,
3586
+ }),
3587
+ ...(virtualConfig.useScrollendEvent !== undefined && { useScrollendEvent: virtualConfig.useScrollendEvent }),
3588
+ ...(virtualConfig.getItemKey !== undefined && { getItemKey: virtualConfig.getItemKey }),
3589
+ ...(virtualConfig.rangeExtractor !== undefined && { rangeExtractor: virtualConfig.rangeExtractor }),
3574
3590
  };
3575
3591
  });
3576
3592
  _measureVirtualItems = effect(() => {