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

Need isValidated to run on both Next and Previous navigation. #97

Open
AnneEO opened this issue May 2, 2018 · 4 comments
Open

Need isValidated to run on both Next and Previous navigation. #97

AnneEO opened this issue May 2, 2018 · 4 comments

Comments

@AnneEO
Copy link

AnneEO commented May 2, 2018

Great library, thank you so much for the work you have put in!

My situation allows the user to navigate forward and backward, both using the buttons and by clicking the step navigation at the top. Each step is complete within its own component and needs validation before leaving. I discovered today that validation (isValidated) only fires when moving forward. I've searched the docs and don't see a way to configure it to run isValidated in both directions, am I missing something, or is it truly not possible?

@newbreedofgeek
Copy link
Owner

Good question and tnx for the kind words.

I believe you are right. IsValidated does only work for forward movement. It was a design choice as it was initially built to be a wizard. (So move forward to fill the form and back to correct previous steps) - forcing validation on back step won’t be hard to do but will cause a lot of confusion for others who prefer the wizard workflow. I have not had any other requests for this, but will do to if the need arises.

@ghost
Copy link

ghost commented Feb 21, 2019

Hi, I have the same problem right now. I would love to check the user when jumping back and if necessary not allow him to jump back.
I think it is essential that isValidated() can also be used for back navigation.
But isValidated should always know if it was called by the backButton or by the nextButton.
This gives the users of the library much more possibilities to use stepzilla flexibly.

@ghost
Copy link

ghost commented Jul 12, 2019

Hi! Thanks for this great lib. Would also love to do validation when going "back" in the wizard.

@Dshah-bb
Copy link

+1

I will need the action on back button, just to make the user aware he is going back without saving the changes. Will be of great help!

Thanks for the wonderful library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants