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

Method _handleArrowUp

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

Source from the content-addressed store, hash-verified

983 }
984
985 _handleArrowUp(e: KeyboardEvent, indexOfItem: number) {
986 const isOpen = this.open;
987
988 if (indexOfItem === 0) {
989 this._clearFocus();
990 this._itemFocused = false;
991 this.focused = true;
992
993 if (this.hasValueStateText && isOpen) {
994 this._filteredItems[0].selected = false;
995 this.value = this._userTypedValue;
996 }
997
998 return;
999 }
1000
1001 this._handleItemNavigation(e, --indexOfItem, false /* isForward */);
1002 }
1003
1004 _handlePageUp(e: KeyboardEvent, indexOfItem: number) {
1005 const allItems = this._getItems();

Callers

nothing calls this directly

Calls 2

_clearFocusMethod · 0.95
_handleItemNavigationMethod · 0.95

Tested by

no test coverage detected