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

Method _getFirstMatchingItem

packages/main/src/Input.ts:1320–1330  ·  view source on GitHub ↗
(current: string)

Source from the content-addressed store, hash-verified

1318 }
1319
1320 _getFirstMatchingItem(current: string): IInputSuggestionItemSelectable | undefined {
1321 if (!this._flattenItems.length) {
1322 return;
1323 }
1324
1325 const matchingItems = this._startsWithMatchingItems(current).filter(item => !this._isGroupItem(item));
1326
1327 if (matchingItems.length) {
1328 return matchingItems[0];
1329 }
1330 }
1331
1332 _handleSelectionChange(e: CustomEvent<ListSelectionChangeEventDetail>) {
1333 this.Suggestions?.onItemPress(e);

Callers 1

onBeforeRenderingMethod · 0.95

Calls 2

_isGroupItemMethod · 0.95

Tested by

no test coverage detected