(tab: string | HTMLIonTabElement)
| 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. |
no test coverage detected