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

Method shouldAutocomplete

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

Source from the content-addressed store, hash-verified

826 }
827
828 shouldAutocomplete(e: InputEvent): boolean {
829 const eventType = e.inputType;
830 const allowedEventTypes = [
831 "deleteWordBackward",
832 "deleteWordForward",
833 "deleteSoftLineBackward",
834 "deleteSoftLineForward",
835 "deleteEntireSoftLine",
836 "deleteHardLineBackward",
837 "deleteHardLineForward",
838 "deleteByDrag",
839 "deleteByCut",
840 "deleteContent",
841 "deleteContentBackward",
842 "deleteContentForward",
843 "historyUndo",
844 ];
845
846 return !this.noTypeahead && !allowedEventTypes.includes(eventType);
847 }
848
849 _startsWithMatchingItems(str: string): Array<IComboBoxItem> {
850 const allItems:Array<IComboBoxItem> = this._getItems().filter(item => !isInstanceOfComboBoxItemGroup(item));

Callers 1

_inputMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected