@momentum-design/components 0.129.2 → 0.129.3

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.
@@ -435,21 +435,21 @@ class VirtualizedList extends DataAriaLabelMixin(List) {
435
435
  }
436
436
  }
437
437
  });
438
- this.updateHiddenItemsPosition();
438
+ this.updateHiddenItemsPosition(range);
439
439
  defaultIndexes.sort((a, b) => a - b);
440
440
  return defaultIndexes;
441
441
  }
442
442
  /** @internal */
443
- updateHiddenItemsPosition() {
443
+ updateHiddenItemsPosition(range) {
444
444
  const { navItems, virtualizerProps, virtualizer } = this;
445
445
  if (!virtualizer || virtualizerProps.count === 0)
446
446
  return;
447
- const { measurementsCache, range } = virtualizer;
447
+ const { measurementsCache } = virtualizer;
448
448
  this.hiddenIndexes.forEach(index => {
449
- var _a;
450
449
  const el = navItems.at(index);
451
450
  if (el) {
452
- const first = measurementsCache[(_a = range === null || range === void 0 ? void 0 : range.startIndex) !== null && _a !== void 0 ? _a : 0];
451
+ const startIndex = Math.max(range.startIndex - range.overscan, 0);
452
+ const first = measurementsCache[startIndex];
453
453
  const current = measurementsCache[index];
454
454
  el.setAttribute('data-virtualized-hidden', 'true');
455
455
  el.style.setProperty('--mdc-virtualizedlist-hidden-top', `${current.start - first.start}px`);
@@ -23,6 +23,8 @@ const styles = [
23
23
  position: absolute !important;
24
24
  top: var(--mdc-virtualizedlist-hidden-top) !important;
25
25
  left: 0 !important;
26
+ opacity: 0 !important;
27
+ pointer-events: none !important;
26
28
  }
27
29
 
28
30
  ::slotted(mdc-listitem) {