bulma-steps icon indicating copy to clipboard operation
bulma-steps copied to clipboard

How to prevent step from being changed?

Open crabnky opened this issue 5 years ago • 4 comments

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 avatar Apr 09 '19 22:04 crabnky

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.

crabnky avatar Apr 09 '19 22:04 crabnky

I'm trying to do the same flowing this example but no luck so far. https://github.com/Wikiki/bulma-extensions/issues/20

mojpe avatar May 02 '19 10:05 mojpe

Hello, how did you do this?

I am using https://github.com/Wikiki/bulma-extensions/issues/20#issuecomment-357448004 but it gave me "StepsWizard is not defined"

jeraldpunx avatar May 03 '19 02:05 jeraldpunx

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

https://github.com/Wikiki/bulma-steps/blob/2eda7e41ab637875a667ab7af87d83ebb571fe21/dist/js/bulma-steps.js#L272

vs

https://github.com/Wikiki/bulma-steps/blob/2eda7e41ab637875a667ab7af87d83ebb571fe21/src/js/index.js#L173

Possible fix

cawalch avatar May 05 '19 21:05 cawalch