@momentum-design/components 0.128.0 → 0.129.1
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 +37 -37
- package/dist/browser/index.js.map +3 -3
- package/dist/components/virtualizedlist/virtualizedlist.component.d.ts +1 -1
- package/dist/components/virtualizedlist/virtualizedlist.component.js +3 -6
- package/dist/custom-elements.json +528 -504
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +2 -2
- package/dist/utils/mixins/ListNavigationMixin.d.ts +1 -1
- package/dist/utils/mixins/ListNavigationMixin.js +5 -3
- package/package.json +1 -1
|
@@ -281,7 +281,7 @@ declare class VirtualizedList extends VirtualizedList_base {
|
|
|
281
281
|
private checkAtBottom;
|
|
282
282
|
protected handleNavigationKeyDown(event: KeyboardEvent): void;
|
|
283
283
|
protected resetTabIndexes(index: number, focusElement?: boolean): void;
|
|
284
|
-
protected resetTabIndexAndSetFocus(newIndex: number, oldIndex?: number, focusNewItem?: boolean): void;
|
|
284
|
+
protected resetTabIndexAndSetFocus(newIndex: number, oldIndex?: number, focusNewItem?: boolean, scrollToNewItem?: boolean): void;
|
|
285
285
|
/** @internal */
|
|
286
286
|
private setAriaSetSize;
|
|
287
287
|
/**
|
|
@@ -467,9 +467,6 @@ class VirtualizedList extends DataAriaLabelMixin(List) {
|
|
|
467
467
|
const { count, getItemKey } = this.virtualizer.options;
|
|
468
468
|
this.selectedIndex = Math.max(0, Math.min(count - 1, newIndex));
|
|
469
469
|
this.selectedKey = getItemKey(newIndex);
|
|
470
|
-
if (this.scrollAnchoring && this.selectedIndex + 1 === count) {
|
|
471
|
-
this.atBottom = 'yes';
|
|
472
|
-
}
|
|
473
470
|
}
|
|
474
471
|
}
|
|
475
472
|
onElementStoreUpdate(item, changeType) {
|
|
@@ -564,17 +561,17 @@ class VirtualizedList extends DataAriaLabelMixin(List) {
|
|
|
564
561
|
super.resetTabIndexes(index, focusElement);
|
|
565
562
|
this.setSelectedIndex(index);
|
|
566
563
|
}
|
|
567
|
-
resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem) {
|
|
564
|
+
resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem = true, scrollToNewItem = focusNewItem) {
|
|
568
565
|
const elementToFocus = this.navItems.find(element => { var _a; return ((_a = this.virtualizer) === null || _a === void 0 ? void 0 : _a.indexFromElement(element)) === newIndex; });
|
|
569
566
|
if (elementToFocus === undefined) {
|
|
570
567
|
this.scrollToIndex(newIndex, {});
|
|
571
568
|
this.endOfScrollQueue.push(() => {
|
|
572
|
-
super.resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem);
|
|
569
|
+
super.resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem, scrollToNewItem);
|
|
573
570
|
this.setSelectedIndex(newIndex);
|
|
574
571
|
});
|
|
575
572
|
return;
|
|
576
573
|
}
|
|
577
|
-
super.resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem);
|
|
574
|
+
super.resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem, scrollToNewItem);
|
|
578
575
|
this.setSelectedIndex(newIndex);
|
|
579
576
|
}
|
|
580
577
|
/** @internal */
|