@momentum-design/components 0.129.1 → 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.
- package/dist/browser/index.js +4 -2
- package/dist/browser/index.js.map +3 -3
- package/dist/components/dialog/dialog.styles.js +1 -1
- package/dist/components/virtualizedlist/virtualizedlist.component.js +5 -5
- package/dist/components/virtualizedlist/virtualizedlist.styles.js +2 -0
- package/dist/custom-elements.json +2234 -2234
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +2 -2
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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`);
|