diff --git a/core/src/components/tabs/tabs.tsx b/core/src/components/tabs/tabs.tsx index ca144a762b..074e69da2b 100644 --- a/core/src/components/tabs/tabs.tsx +++ b/core/src/components/tabs/tabs.tsx @@ -49,14 +49,11 @@ export class Tabs implements NavOutlet { this.useRouter = !!this.doc.querySelector('ion-router') && !this.el.closest('[no-router]'); } this.tabs = Array.from(this.el.querySelectorAll('ion-tab')); + await this.initSelect(); this.ionNavWillLoad.emit(); this.componentWillUpdate(); } - componentDidLoad() { - this.initSelect(); - } - componentDidUnload() { this.tabs.length = 0; this.selectedTab = this.leavingTab = undefined; @@ -156,6 +153,7 @@ export class Tabs implements NavOutlet { } // wait for all tabs to be ready await Promise.all(this.tabs.map(tab => tab.componentOnReady())); + await this.select(this.tabs[0]); }