Skip to content

Commit c5cf38e

Browse files
authored
Merge pull request #64 from devrnt/fix/#63-next-step-with-specific-step
fix: next step if step index is supplied
2 parents 08633ab + 4d88537 commit c5cf38e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wizard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const Wizard: React.FC<WizardProps> = React.memo(
1717
hasPreviousStep.current = activeStep > 0;
1818

1919
const goToNextStep = React.useRef((stepIndex?: number) => {
20-
if (hasNextStep.current) {
20+
if (hasNextStep.current || stepIndex) {
2121
setActiveStep((activeStep) => stepIndex ?? activeStep + 1);
2222
}
2323
});

0 commit comments

Comments
 (0)