()
| 74 | } |
| 75 | |
| 76 | private updateTabBar() { |
| 77 | const tabBar = this.el.querySelector('ion-tab-bar'); |
| 78 | if (!tabBar) { |
| 79 | return; |
| 80 | } |
| 81 | |
| 82 | const tab = this.selectedTab ? this.selectedTab.tab : undefined; |
| 83 | |
| 84 | // If tabs has no selected tab but tab-bar already has a selected-tab set, |
| 85 | // don't overwrite it. This handles cases where tab-bar is used without ion-tab elements. |
| 86 | if (tab === undefined) { |
| 87 | return; |
| 88 | } |
| 89 | |
| 90 | if (tabBar.selectedTab === tab) { |
| 91 | return; |
| 92 | } |
| 93 | |
| 94 | tabBar.selectedTab = tab; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Select a 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 outgoing calls
no test coverage detected