The idea is as follows: there is a V-Stepper
component, it contains few steps. I’d like to trigger the action of sliding to the next step when a validateDirectory
method completes successfully (i.e. the next step button isn’t clicked physically, but the step gets invoked programmatically).
Methods are defined more or less like:
methods: {
stepperPrev() {
this.$refs.stepperActions.prev()
},
stepperNext() {
this.$refs.stepperActions.next()
},
async validateDirectory() {
const response = await fetch(...)
this.stepperNext()
}
The v-stepper-actions
contain: <v-stepper-actions ref="stepperActions" @click:next="next" @click:prev="prev"></v-stepper-actions>
However, when trying to achieve the transition to the next stepper window, I get the error: this.$refs.stepperActions.next is not a function
.
Also tried defining the methods as:
stepperPrev(prev) {
prev()
},
stepperNext(next) {
next()
}
It also didn’t work.
Is there any way to trigger the transition to the next step? Also, is it possible to hide the v-stepper-actions
and still be able to trigger the action programmatically?