#Stepper: onStepClick deactivate dynamically
5 messages · Page 1 of 1 (latest)
Hi thnx for the link, however i don t want to disable steps selection all the time.
Example: imagine you have a form instide the step. I want to validate before going to next step (by clicking the step icon not only a Button) if valid than let the stepper increment if not abort.
const [active, setActive] = useState(1);
<Stepper
active={active}
onStepClick={(step) => {
if (...) setActive(step);
}}
>
...
</Stepper>
You can do it inside onStepClick handler