MCPcopy Create free account
hub / github.com/UI5/webcomponents / _handlePageDown

Method _handlePageDown

packages/main/src/ComboBox.ts:1013–1022  ·  view source on GitHub ↗
(e: KeyboardEvent, indexOfItem: number)

Source from the content-addressed store, hash-verified

1011 }
1012
1013 _handlePageDown(e: KeyboardEvent, indexOfItem: number) {
1014 const allItems = this._getItems();
1015 const itemsLength = allItems.length;
1016 const isProposedIndexValid = indexOfItem + SKIP_ITEMS_SIZE < itemsLength;
1017
1018 indexOfItem = isProposedIndexValid ? indexOfItem + SKIP_ITEMS_SIZE : itemsLength - 1;
1019 const shouldMoveForward = isInstanceOfComboBoxItemGroup(allItems[indexOfItem]) && !this.open;
1020
1021 this._handleItemNavigation(e, indexOfItem, shouldMoveForward);
1022 }
1023
1024 _handleHome(e: KeyboardEvent) {
1025 const shouldMoveForward = isInstanceOfComboBoxItemGroup(this._filteredItems[0]) && !this.open;

Callers

nothing calls this directly

Calls 2

_getItemsMethod · 0.95
_handleItemNavigationMethod · 0.95

Tested by

no test coverage detected