MCPcopy Index your code
hub / github.com/UI5/webcomponents / _handleArrowNavigation

Method _handleArrowNavigation

packages/main/src/MultiComboBox.ts:1306–1330  ·  view source on GitHub ↗
(e: KeyboardEvent, isDownControl: boolean)

Source from the content-addressed store, hash-verified

1304 }
1305
1306 _handleArrowNavigation(e: KeyboardEvent, isDownControl: boolean) {
1307 const isArrowDown = isDownControl || isDown(e);
1308 const hasSuggestions = this._getItems().length;
1309
1310 e.preventDefault();
1311
1312 if (this.hasValueStateMessage && !this.valueStateHeader) {
1313 this._setValueStateHeader();
1314 }
1315
1316 if (isArrowDown && this.open) {
1317 if (this.showSelectAll) {
1318 (this._getResponsivePopover().querySelector(".ui5-mcb-select-all-checkbox") as CheckBox).focus();
1319 return;
1320 }
1321 }
1322
1323 if (isArrowDown && hasSuggestions) {
1324 this._handleArrowDown();
1325 }
1326
1327 if (!isArrowDown && !this.open && !this.readonly) {
1328 this._navigateToPrevItem();
1329 }
1330 }
1331
1332 async _handleArrowDown() {
1333 const firstListItem = this.list?.getSlottedNodes<IMultiComboBoxItem>("items")[0];

Callers 1

_onkeydownMethod · 0.95

Calls 7

_getItemsMethod · 0.95
_setValueStateHeaderMethod · 0.95
_getResponsivePopoverMethod · 0.95
_handleArrowDownMethod · 0.95
_navigateToPrevItemMethod · 0.95
isDownFunction · 0.85
focusMethod · 0.45

Tested by

no test coverage detected