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

Method selectTab

packages/main/src/TabContainer.ts:934–942  ·  view source on GitHub ↗

* Fires the `tab-select` event and changes the internal reference for the currently selected tab. * If the event is prevented, the current tab is not changed. * @private * @param selectedTab selected tab instance * @param selectedTabIndex selected tab index for an array containing all tabs a

(selectedTab: Tab, selectedTabIndex: number)

Source from the content-addressed store, hash-verified

932 * @returns true if the tab selection is successful, false if it was prevented
933 */
934 selectTab(selectedTab: Tab, selectedTabIndex: number) {
935 if (!this.fireDecoratorEvent("tab-select", { tab: selectedTab, tabIndex: selectedTabIndex })) {
936 return false;
937 }
938
939 // select the tab
940 this._selectedTab = selectedTab;
941 return true;
942 }
943
944 slideContentDown(element: HTMLElement) {
945 return slideDown(element).promise();

Callers 1

_onItemSelectMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected