bulma-steps
bulma-steps copied to clipboard
How to prevent step from being changed?
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
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.
I'm trying to do the same flowing this example but no luck so far. https://github.com/Wikiki/bulma-extensions/issues/20
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"
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