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

Method _getFirstMatchingItem

packages/main/src/MultiComboBox.ts:1820–1830  ·  view source on GitHub ↗
(current: string)

Source from the content-addressed store, hash-verified

1818 }
1819
1820 _getFirstMatchingItem(current: string) {
1821 if (!this._getItems().length) {
1822 return;
1823 }
1824
1825 const matchingItems = this._startsWithMatchingItems(current).filter(item => !item.selected);
1826
1827 if (matchingItems.length) {
1828 return matchingItems[0];
1829 }
1830 }
1831
1832 _startsWithMatchingItems(str: string) {
1833 return Filters.StartsWith(str, this._getItems().filter(item => !item.isGroupItem), "text");

Callers 1

onBeforeRenderingMethod · 0.95

Calls 2

_getItemsMethod · 0.95

Tested by

no test coverage detected