No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Q-stepper How to programmatically set step on mounting

    Help
    2
    3
    365
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • CWoodman
      CWoodman last edited by

      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.

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @CWoodman last edited by dobbel

        @CWoodman

        https://codepen.io/ontwikkelfabriek/pen/oNxQoyp

        I used the created hook

        1 Reply Last reply Reply Quote 0
        • CWoodman
          CWoodman last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post