File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
packages/react/src/components/navigation Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -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 = typeof this . props . children === 'function' ?
9091 ( this . props . children as ChildFunction ) ( this . ionTabContextState ) : this . props . children ;
@@ -99,14 +100,12 @@ export class IonTabs extends React.Component<Props> {
99100 outlet = child . props . children [ 0 ] ;
100101 }
101102 if ( child . type === IonTabBar ) {
102- const { onIonTabsDidChange, onIonTabsWillChange } = this . props ;
103103 tabBar = React . cloneElement ( child , {
104104 onIonTabsDidChange,
105105 onIonTabsWillChange,
106106 ref : this . tabBarRef
107107 } ) ;
108108 } else if ( child . type === Fragment && child . props . children [ 1 ] . type === IonTabBar ) {
109- const { onIonTabsDidChange, onIonTabsWillChange } = this . props ;
110109 tabBar = React . cloneElement ( child . props . children [ 1 ] , {
111110 onIonTabsDidChange,
112111 onIonTabsWillChange,
@@ -122,7 +121,7 @@ export class IonTabs extends React.Component<Props> {
122121 throw new Error ( 'IonTabs needs a IonTabBar' ) ;
123122 }
124123
125- const { className , ... props } = this . props ;
124+
126125
127126 return (
128127 < IonTabsContext . Provider
You can’t perform that action at this time.
0 commit comments