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

Method _onTabStripClick

packages/main/src/TabContainer.ts:729–750  ·  view source on GitHub ↗
(e: Event)

Source from the content-addressed store, hash-verified

727 }
728
729 async _onTabStripClick(e: Event) {
730 const tab = getTabInStrip(e.target as HTMLElement);
731 if (!tab || tab.realTabReference.disabled) {
732 return;
733 }
734
735 e.stopPropagation();
736 e.preventDefault();
737
738 if ((e.target as HTMLElement).hasAttribute("ui5-button")) {
739 this._onTabExpandButtonClick(e);
740 return;
741 }
742
743 if (!tab.realTabReference.hasOwnContent && tab.realTabReference.tabs.length) {
744 await this._togglePopover(tab);
745
746 return;
747 }
748
749 this._onHeaderItemSelect(tab, e);
750 }
751
752 async _onTabExpandButtonClick(e: Event) {
753 e.stopPropagation();

Callers 2

_onTabStripKeyDownMethod · 0.95
_onTabStripKeyUpMethod · 0.95

Calls 5

_togglePopoverMethod · 0.95
_onHeaderItemSelectMethod · 0.95
getTabInStripFunction · 0.85
hasAttributeMethod · 0.80

Tested by

no test coverage detected