@ionic/react 8.3.1-dev.11726089748.1641303c → 8.3.1-dev.11726159792.1a6f49de
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1963,7 +1963,7 @@ class IonTabBarUnwrapped extends React.PureComponent {
|
|
|
1963
1963
|
};
|
|
1964
1964
|
}
|
|
1965
1965
|
onTabButtonClick(e, onClickFn) {
|
|
1966
|
-
var _a
|
|
1966
|
+
var _a;
|
|
1967
1967
|
const tappedTab = this.state.tabs[e.detail.tab];
|
|
1968
1968
|
const originalHref = tappedTab.originalHref;
|
|
1969
1969
|
/**
|
|
@@ -1994,10 +1994,8 @@ class IonTabBarUnwrapped extends React.PureComponent {
|
|
|
1994
1994
|
if (this.props.onIonTabsDidChange) {
|
|
1995
1995
|
this.props.onIonTabsDidChange(new CustomEvent('ionTabDidChange', { detail: { tab: e.detail.tab } }));
|
|
1996
1996
|
}
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
this.context.changeTab(e.detail.tab, currentHref, e.detail.routeOptions);
|
|
2000
|
-
}
|
|
1997
|
+
this.setActiveTabOnContext(e.detail.tab);
|
|
1998
|
+
this.context.changeTab(e.detail.tab, currentHref, e.detail.routeOptions);
|
|
2001
1999
|
}
|
|
2002
2000
|
}
|
|
2003
2001
|
renderTabButton(activeTab) {
|
|
@@ -2145,9 +2143,6 @@ const IonTabs = /*@__PURE__*/ (() => class extends React.Component {
|
|
|
2145
2143
|
if (outlet && hasTab) {
|
|
2146
2144
|
throw new Error('IonTabs cannot contain an IonRouterOutlet and an IonTab at the same time');
|
|
2147
2145
|
}
|
|
2148
|
-
if (!tabBar) {
|
|
2149
|
-
throw new Error('IonTabs needs a IonTabBar');
|
|
2150
|
-
}
|
|
2151
2146
|
if (hasTab) {
|
|
2152
2147
|
return React.createElement(IonTabsInner, Object.assign({}, this.props));
|
|
2153
2148
|
}
|
|
@@ -2189,9 +2184,9 @@ const IonTabs = /*@__PURE__*/ (() => class extends React.Component {
|
|
|
2189
2184
|
}
|
|
2190
2185
|
return child;
|
|
2191
2186
|
})))) : (React.createElement("div", Object.assign({ className: className ? `${className}` : 'ion-tabs' }, props, { style: hostStyles }),
|
|
2192
|
-
tabBar.props.slot === 'top' ? tabBar : null,
|
|
2187
|
+
(tabBar === null || tabBar === void 0 ? void 0 : tabBar.props.slot) === 'top' ? tabBar : null,
|
|
2193
2188
|
React.createElement("div", { style: tabsInner, className: "tabs-inner" }, outlet),
|
|
2194
|
-
tabBar.props.slot === 'bottom' ? tabBar : null))));
|
|
2189
|
+
(tabBar === null || tabBar === void 0 ? void 0 : tabBar.props.slot) === 'bottom' ? tabBar : null))));
|
|
2195
2190
|
}
|
|
2196
2191
|
static get contextType() {
|
|
2197
2192
|
return NavContext;
|