Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should onClick be possible when the current step is disabled? #30

Closed
kevenleone opened this issue Jun 9, 2023 · 3 comments
Closed

Should onClick be possible when the current step is disabled? #30

kevenleone opened this issue Jun 9, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@kevenleone
Copy link
Contributor

kevenleone commented Jun 9, 2023

Hello 👋🏻

Good job with this library, it's very helpful and well organized @raisiqueira.

I was looking into examples and I had this doubt, should the user be able to click on the step, even though the step is disabled?

See:

Gravacao.de.Tela.2023-06-09.as.17.20.11.mov

Does it make sense? From my POV, it makes sense to trigger nextStep even if it's disabled, because the dev can control whether the step is changed, different from the user clicking on the step.

image
@kevenleone
Copy link
Contributor Author

If it's makes sense, I can send the code and the test for it

@raisiqueira raisiqueira added the bug Something isn't working label Jun 10, 2023
@raisiqueira
Copy link
Owner

Hi @kevenleone, thanks for the detailed issue. Yes, you're right, I had handled this behavior in the Stepper component, but not in the hook. Could you open a pull request with this fix? Thanks.

kevenleone added a commit to kevenleone/headless-stepper-monorepo that referenced this issue Jun 11, 2023
kevenleone added a commit to kevenleone/headless-stepper-monorepo that referenced this issue Jun 11, 2023
raisiqueira pushed a commit that referenced this issue Jun 14, 2023
* fix(lib): onClick is not updating currentStep if step is disabled #30

* test(project): Cover unit and E2E test for disabled step #30
@raisiqueira
Copy link
Owner

Solved on #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants