Open scotthez opened 1 month ago
I had the same issue. I solved it by adding e.preventDefault()
to the button that triggers the stepper.prev()
action:
<Button
className="w-36"
variant="outline"
onClick={(e) => {
e.preventDefault();
stepper.prev();
}}
disabled={stepper.isFirst}
>
You just have to add the type="button" attribute for the "prev" button.
Describe the bug Looking at the react hook form examples, if you add another step within that example the back button doesnt work within the newly created steps.
To Reproduce Steps to reproduce the behavior:
Expected behavior Should go to previous step
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.