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

Method _input

packages/main/src/ComboBox.ts:793–826  ·  view source on GitHub ↗
(e: InputEvent)

Source from the content-addressed store, hash-verified

791 }
792
793 _input(e: InputEvent) {
794 const { value } = e.target as HTMLInputElement;
795 const shouldAutocomplete = this.shouldAutocomplete(e);
796
797 if (e.target === this.inner) {
798 // stop the native event, as the semantic "input" would be fired.
799 e.stopImmediatePropagation();
800 this.focused = true;
801 }
802
803 this._filteredItems = this._filterItems(value);
804
805 this.value = value;
806 this.filterValue = value;
807
808 this._clearFocus();
809
810 // autocomplete
811 if (shouldAutocomplete && !this._isComposing && !isAndroid()) {
812 this._handleTypeAhead(value, value);
813 }
814
815 this.fireDecoratorEvent("input");
816
817 if (isPhone()) {
818 return;
819 }
820
821 if (!this._filteredItems.length || value === "") {
822 this._closeRespPopover();
823 } else {
824 this._openRespPopover();
825 }
826 }
827
828 shouldAutocomplete(e: InputEvent): boolean {
829 const eventType = e.inputType;

Callers

nothing calls this directly

Calls 8

shouldAutocompleteMethod · 0.95
_filterItemsMethod · 0.95
_clearFocusMethod · 0.95
_handleTypeAheadMethod · 0.95
_closeRespPopoverMethod · 0.95
_openRespPopoverMethod · 0.95
isAndroidFunction · 0.85
isPhoneFunction · 0.85

Tested by

no test coverage detected