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

Method _onMobileInputKeydown

packages/main/src/MultiComboBox.ts:696–717  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

694 }
695
696 _onMobileInputKeydown(e: KeyboardEvent) {
697 if (!isEnter(e)) {
698 return;
699 }
700
701 const { value } = (e.target as Input);
702 const matchingItem = this._getItems().find(item => item.text === value);
703
704 if (!matchingItem) {
705 return;
706 }
707
708 const initiallySelected = matchingItem?.selected;
709 const changePrevented = this.fireSelectionChange();
710
711 if (!changePrevented) {
712 matchingItem.selected = !initiallySelected;
713 this._getResponsivePopover().preventFocusRestore = false;
714 this.open = false;
715 this.value = "";
716 }
717 }
718
719 _toggleTokenizerPopover() {
720 this.tokenizerOpen = false;

Callers

nothing calls this directly

Calls 4

_getItemsMethod · 0.95
fireSelectionChangeMethod · 0.95
_getResponsivePopoverMethod · 0.95
isEnterFunction · 0.85

Tested by

no test coverage detected