@ionic/react 8.3.1-dev.11726258029.1014159b → 8.3.1-dev.11727899155.103c4afc

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 CHANGED
@@ -1963,7 +1963,7 @@ class IonTabBarUnwrapped extends React.PureComponent {
1963
1963
  };
1964
1964
  }
1965
1965
  onTabButtonClick(e, onClickFn) {
1966
- var _a, _b;
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
- 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
- }
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,6 +2143,9 @@ 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
  }
2146
+ if (!tabBar) {
2147
+ throw new Error('IonTabs needs a IonTabBar');
2148
+ }
2148
2149
  if (hasTab) {
2149
2150
  return React.createElement(IonTabsInner, Object.assign({}, this.props));
2150
2151
  }
@@ -2186,9 +2187,9 @@ const IonTabs = /*@__PURE__*/ (() => class extends React.Component {
2186
2187
  }
2187
2188
  return child;
2188
2189
  })))) : (React.createElement("div", Object.assign({ className: className ? `${className}` : 'ion-tabs' }, props, { style: hostStyles }),
2189
- (tabBar === null || tabBar === void 0 ? void 0 : tabBar.props.slot) === 'top' ? tabBar : null,
2190
+ tabBar.props.slot === 'top' ? tabBar : null,
2190
2191
  React.createElement("div", { style: tabsInner, className: "tabs-inner" }, outlet),
2191
- (tabBar === null || tabBar === void 0 ? void 0 : tabBar.props.slot) === 'bottom' ? tabBar : null))));
2192
+ tabBar.props.slot === 'bottom' ? tabBar : null))));
2192
2193
  }
2193
2194
  static get contextType() {
2194
2195
  return NavContext;