Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

How to prevent step from being changed? #27

Open
crabnky opened this issue Apr 9, 2019 · 4 comments
Open

How to prevent step from being changed? #27

crabnky opened this issue Apr 9, 2019 · 4 comments

Comments

@crabnky
Copy link

crabnky commented Apr 9, 2019

Hi,

just before step is changed I want to check some conditions and change step or not. How do I do this? I truied to use beforeNext option and return false if I do not want to change step, but it does not work. Did I miss something?

Thanks

@crabnky
Copy link
Author

crabnky commented Apr 9, 2019

OK, I figured out that beforeNext callback should return array of errors - than step won't be changed.
But now I'm trying to validate form via ajax, and now it seems like step is changed before ajax call returns a response - this is due to async request of course.

@mojpe
Copy link

mojpe commented May 2, 2019

I'm trying to do the same flowing this example but no luck so far.
Wikiki/bulma-extensions#20

@jeraldpunx
Copy link

Hello, how did you do this?

I am using Wikiki/bulma-extensions#20 (comment) but it gave me "StepsWizard is not defined"

@cawalch
Copy link

cawalch commented May 5, 2019

Looks like dist wasn't updated with the latest changes.

errors = this.options.beforeNext(current_id);

vs

errors = await this.options.beforeNext(current_id);

Possible fix

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

No branches or pull requests

4 participants