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

Method currentItemIndex

packages/main/src/Input.ts:942–948  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

940 }
941
942 get currentItemIndex() {
943 const allItems = this.Suggestions?._getItems() as IInputSuggestionItemSelectable[];
944 const visibleItems = allItems.filter(item => !item.hidden);
945 const currentItem = visibleItems.find(item => { return item.selected || item.focused; });
946 const indexOfCurrentItem = currentItem ? visibleItems.indexOf(currentItem) : -1;
947 return indexOfCurrentItem;
948 }
949
950 _handleUp(e: KeyboardEvent) {
951 if (this.Suggestions?.isOpened()) {

Callers

nothing calls this directly

Calls 1

_getItemsMethod · 0.45

Tested by

no test coverage detected