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

Method _selectTypedItem

packages/main/src/Select.ts:735–749  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

733 }
734
735 _selectTypedItem(text: string) {
736 const currentIndex = this._selectedIndex;
737 const itemToSelect = this._searchNextItemByText(text);
738
739 if (itemToSelect) {
740 const nextIndex = this.options.indexOf(itemToSelect);
741
742 this._changeSelectedItem(this._selectedIndex, nextIndex);
743
744 if (currentIndex !== this._selectedIndex) {
745 this.itemSelectionAnnounce();
746 this._scrollSelectedItem();
747 }
748 }
749 }
750
751 _searchNextItemByText(text: string) {
752 let orderedOptions = this.options.slice(0);

Callers 1

Calls 4

_searchNextItemByTextMethod · 0.95
_changeSelectedItemMethod · 0.95
itemSelectionAnnounceMethod · 0.95
_scrollSelectedItemMethod · 0.95

Tested by

no test coverage detected