-
Notifications
You must be signed in to change notification settings - Fork 129
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
Detect "Next" click to perform call then proceed to next step on success #13
Comments
Hi @ianarsenault , We've just released a new package version (1.3.0). Here you can find a new event which is emitted before newStep action. So you can easily accomplish your goal. Below example exposes how you can use it: <div class="column is-8 is-offset-2">
<horizontal-stepper @before-next-step="beforeNextStep" :steps="demoSteps" @completed-step="completeStep" :top-buttons="true" @active-step="isStepActive" @stepper-finished="alert">
</horizontal-stepper>
</div> .
.
.
methods: {
beforeNextStep ({ currentStep }, next) {
// Here your logic
........
// Then next
next()
}
.
.
. Don't forget calling You also have access to the current step. so you can check Hope this helps |
Thank you @Edujugon ! |
Hi! the event is triggered when the next button is disabled, how i can to fix it? |
Following your example, I'm trying to have a user fill out a simple form. I'd like to keep the button disabled until vuelidate does it's thing, and once everything checks out allow the button to be clickable.
When it's "clickable" + clicked I'd like to call a function and upon success, go to the next step.
How do I go about detecting next button click, and how do I prevent from going to next step until I want to?
I'm currently at where I can save to the DB once there are no vuelidate errors. However I would like it so that it only saves once the user clicks "Next"
The text was updated successfully, but these errors were encountered: