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

Method _flatten

packages/main/src/TabContainer.ts:893–903  ·  view source on GitHub ↗
(items: Array<ITab>)

Source from the content-addressed store, hash-verified

891 }
892
893 _flatten(items: Array<ITab>) {
894 const result: Array<ITab> = [];
895
896 walk(items, item => {
897 if (item.hasAttribute("ui5-tab") || item.hasAttribute("ui5-tab-separator")) {
898 result.push(item);
899 }
900 });
901
902 return result;
903 }
904
905 _onItemSelect(selectedTabId: string, originalEvent?: Event) {
906 const selectedTabIndex = this._itemsFlat.findIndex(item => item.__id === selectedTabId);

Callers 3

onBeforeRenderingMethod · 0.95
allItemsMethod · 0.95
_setPopoverItemsMethod · 0.95

Calls 3

walkFunction · 0.85
hasAttributeMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected