File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const Wizard: React.FC<WizardProps> = React.memo(
1111 const hasNextStep = React . useRef ( true ) ;
1212 const hasPreviousStep = React . useRef ( false ) ;
1313 const nextStepHandler = React . useRef < Handler > ( ( ) => { } ) ;
14- const stepCount = React . Children . count ( children ) ;
14+ const stepCount = React . Children . toArray ( children ) . length ;
1515
1616 hasNextStep . current = activeStep < stepCount - 1 ;
1717 hasPreviousStep . current = activeStep > 0 ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const renderUseWizardHook = (initialStartIndex = 0) => {
1212 wrapper : ( { children, startIndex } ) => (
1313 < Wizard startIndex = { startIndex } >
1414 < p > step 1 { children } </ p >
15+ { false && < p > Optional step</ p > }
1516 < p > step 2 { children } </ p >
1617 </ Wizard >
1718 ) ,
You can’t perform that action at this time.
0 commit comments