Skip to content

Commit 4d88537

Browse files
committed
fix: next step if step index is supplied
1 parent 08633ab commit 4d88537

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)