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

Method _beforeOpen

packages/main/src/MultiComboBox.ts:1738–1757  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1736 }
1737
1738 _beforeOpen() {
1739 this.open = true;
1740 this._itemsBeforeOpen = this._getItems().map(item => {
1741 return {
1742 ref: item,
1743 selected: item.selected,
1744 };
1745 });
1746
1747 this._valueBeforeOpen = this.value;
1748 this._dialogInputValueState = this.valueState;
1749
1750 // in order to use the autocomplete feature of the input we should not set value in state
1751 this._innerInput.value = this.value;
1752
1753 if (this.filterSelected) {
1754 const selectedItems = this._filteredItems.filter(item => item.selected);
1755 this.selectedItems = this._getItems().filter((item, idx, allItems) => MultiComboBox._groupItemFilter(item, ++idx, allItems, selectedItems) || selectedItems.indexOf(item) !== -1);
1756 }
1757 }
1758
1759 _addLinksEventListeners() {
1760 const links = this.linksInAriaValueStateHiddenText;

Callers

nothing calls this directly

Calls 2

_getItemsMethod · 0.95
_groupItemFilterMethod · 0.80

Tested by

no test coverage detected