MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / select

Method select

core/src/components/tabs/tabs.tsx:103–113  ·  view source on GitHub ↗
(tab: string | HTMLIonTabElement)

Source from the content-addressed store, hash-verified

101 */
102 @Method()
103 async select(tab: string | HTMLIonTabElement): Promise<boolean> {
104 const selectedTab = getTab(this.tabs, tab);
105 if (!this.shouldSwitch(selectedTab)) {
106 return false;
107 }
108 await this.setActive(selectedTab);
109 await this.notifyRouter();
110 this.tabSwitch();
111
112 return true;
113 }
114
115 /**
116 * Get a specific tab by the value of its `tab` property or an element reference. This method is only available for vanilla JavaScript projects. The Angular, React, and Vue implementations of tabs are coupled to each framework's router.

Callers 2

componentWillLoadMethod · 0.95
TabsClass · 0.95

Calls 5

shouldSwitchMethod · 0.95
setActiveMethod · 0.95
notifyRouterMethod · 0.95
tabSwitchMethod · 0.95
getTabFunction · 0.85

Tested by

no test coverage detected