Q-stepper How to programmatically set step on mounting
-
I have a q-stepper with header-nav like this:
<q-stepper v-model="step" vertical header-nav color="primary" animated >
In some cases, I would like to set the opened step to be other than step 1.
But if I do this:mounted () { if (some reason) { this.step = 3 } ... }
Then none of the stepper navigation works. All steps are closed and none can be opened.
-
-
Thanks. I found the problem. Number of steps is dynamic, based on props and valid steps are contained in an array. I was trying to set the initial step before the array was set up. Just had to get things in the right order after mounting.