@ionic/react 8.3.1-dev.11726172907.15a1af41 → 8.3.1-dev.11726241210.1ab7a0ab
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 +7 -8
- 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, _b;
|
|
1967
1967
|
const tappedTab = this.state.tabs[e.detail.tab];
|
|
1968
1968
|
const originalHref = tappedTab.originalHref;
|
|
1969
1969
|
/**
|
|
@@ -1994,8 +1994,10 @@ 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
|
-
this.
|
|
1998
|
-
|
|
1997
|
+
if ((_b = this.props.routerOutletRef) === null || _b === void 0 ? void 0 : _b.current) {
|
|
1998
|
+
this.setActiveTabOnContext(e.detail.tab);
|
|
1999
|
+
this.context.changeTab(e.detail.tab, currentHref, e.detail.routeOptions);
|
|
2000
|
+
}
|
|
1999
2001
|
}
|
|
2000
2002
|
}
|
|
2001
2003
|
renderTabButton(activeTab) {
|
|
@@ -2143,9 +2145,6 @@ const IonTabs = /*@__PURE__*/ (() => class extends React.Component {
|
|
|
2143
2145
|
if (outlet && hasTab) {
|
|
2144
2146
|
throw new Error('IonTabs cannot contain an IonRouterOutlet and an IonTab at the same time');
|
|
2145
2147
|
}
|
|
2146
|
-
if (!tabBar) {
|
|
2147
|
-
throw new Error('IonTabs needs a IonTabBar');
|
|
2148
|
-
}
|
|
2149
2148
|
if (hasTab) {
|
|
2150
2149
|
return React.createElement(IonTabsInner, Object.assign({}, this.props));
|
|
2151
2150
|
}
|
|
@@ -2187,9 +2186,9 @@ const IonTabs = /*@__PURE__*/ (() => class extends React.Component {
|
|
|
2187
2186
|
}
|
|
2188
2187
|
return child;
|
|
2189
2188
|
})))) : (React.createElement("div", Object.assign({ className: className ? `${className}` : 'ion-tabs' }, props, { style: hostStyles }),
|
|
2190
|
-
tabBar.props.slot === 'top' ? tabBar : null,
|
|
2189
|
+
(tabBar === null || tabBar === void 0 ? void 0 : tabBar.props.slot) === 'top' ? tabBar : null,
|
|
2191
2190
|
React.createElement("div", { style: tabsInner, className: "tabs-inner" }, outlet),
|
|
2192
|
-
tabBar.props.slot === 'bottom' ? tabBar : null))));
|
|
2191
|
+
(tabBar === null || tabBar === void 0 ? void 0 : tabBar.props.slot) === 'bottom' ? tabBar : null))));
|
|
2193
2192
|
}
|
|
2194
2193
|
static get contextType() {
|
|
2195
2194
|
return NavContext;
|