Skip to content

Commit

Permalink
switched to use updateActiveStep and check for valid index
Browse files Browse the repository at this point in the history
  • Loading branch information
PuppetFoam committed Jul 5, 2024
1 parent 73c72ce commit 9e600fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/lib/stepper/Stepper.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const Stepper = React.memo(
});

useUpdateEffect(() => {
setActiveStepState(props.activeStep);
if (props.activeStep >= 0 && props.activeStep <= stepperPanels().length - 1) {
updateActiveStep(undefined, props.activeStep);
}
}, [props.activeStep]);

const getStepProp = (step, name) => {
Expand Down

0 comments on commit 9e600fa

Please sign in to comment.