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

Method setActive

core/src/components/tabs/tabs.tsx:156–168  ·  view source on GitHub ↗
(selectedTab: HTMLIonTabElement)

Source from the content-addressed store, hash-verified

154 }
155
156 private setActive(selectedTab: HTMLIonTabElement): Promise<void> {
157 if (this.transitioning) {
158 return Promise.reject('transitioning already happening');
159 }
160
161 this.transitioning = true;
162 this.leavingTab = this.selectedTab;
163 this.selectedTab = selectedTab;
164 this.ionTabsWillChange.emit({ tab: selectedTab.tab });
165 selectedTab.active = true;
166 this.updateTabBar();
167 return Promise.resolve();
168 }
169
170 private tabSwitch() {
171 const selectedTab = this.selectedTab;

Callers 2

selectMethod · 0.95
setRouteIdMethod · 0.95

Calls 1

updateTabBarMethod · 0.95

Tested by

no test coverage detected