raisiqueira/headless-stepper-monorepo

Using useStepper, can we skip a step if disabled if true?

paddyfink opened this issue · 1 comments

Hello @raisiqueira ,

Nice work with this library. I'm thinking about using it for a project, but I was curious, when using the hooks useStepper, what is the gold of the property disabled? In your code sample with chakraUI, the step 4 is disabled but it has no effect on the UI.

Is it possible to skip a step if it is disabled?

Thanks

Hi @paddyfink, thanks for creating this issue. The disabled property when using the hook is not handled by the library, the disabled behavior must be handled by the developer. But if you want that, the disabled step must be skipped, you can use the Stepper component (https://headless-stepper.netlify.app/examples/stepper-component).

I'll also handle the disabled steps in the hook in the next release, I'll keep this issue open until the next release.