@@ -85,6 +85,7 @@ export class IonTabs extends React.Component<Props> {
8585 render ( ) {
8686 let outlet : React . ReactElement < { } > | undefined ;
8787 let tabBar : React . ReactElement | undefined ;
88+ const { className, onIonTabsDidChange, onIonTabsWillChange, ...props } = this . props ;
8889
8990 const children =
9091 typeof this . props . children === 'function'
@@ -101,7 +102,7 @@ export class IonTabs extends React.Component<Props> {
101102 outlet = child . props . children [ 0 ] ;
102103 }
103104 if ( child . type === IonTabBar || child . type . isTabBar ) {
104- const { onIonTabsDidChange , onIonTabsWillChange } = this . props ;
105+
105106 tabBar = React . cloneElement ( child , {
106107 onIonTabsDidChange,
107108 onIonTabsWillChange,
@@ -111,7 +112,7 @@ export class IonTabs extends React.Component<Props> {
111112 child . type === Fragment &&
112113 ( child . props . children [ 1 ] . type === IonTabBar || child . props . children [ 1 ] . type . isTabBar )
113114 ) {
114- const { onIonTabsDidChange , onIonTabsWillChange } = this . props ;
115+
115116 tabBar = React . cloneElement ( child . props . children [ 1 ] , {
116117 onIonTabsDidChange,
117118 onIonTabsWillChange,
@@ -127,8 +128,6 @@ export class IonTabs extends React.Component<Props> {
127128 throw new Error ( 'IonTabs needs a IonTabBar' ) ;
128129 }
129130
130- const { className, ...props } = this . props ;
131-
132131 return (
133132 < IonTabsContext . Provider value = { this . ionTabContextState } >
134133 { this . context . hasIonicRouter ( ) ? (
0 commit comments