Navigation

    Quasar Framework

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

    How to set default value in q-option-group

    Help
    2
    3
    17
    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.
    • C
      cynderkromi last edited by

      This is probably easily answered but after searching I could not find the answer on my own.

      How do I set the default value of an Option Group? Thanks!

              Is this person a judge?<br>
              <q-option-group
              :options="isJudgeOptions"
              label="Notifications"
              type="radio"
              v-model="isJudgeModel"
             />
      
           isJudgeOptions: [
              { label: 'Yes', value: 'yes', color: 'green'  },
              { label: 'No', value: 'no'}
            ],
      
      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @cynderkromi last edited by

        @cynderkromi said in How to set default value in q-option-group:

        q-option-group

        I also don’t see how to do that with the options. You couldhowever set the v-model to your desired default value.

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

          @dobbel Thanks. The option list will be part of a form that will be submitted and saved to IndexedDB. And I will have a page that will be able to update the values, too. So I need to work out all those details. I do want the radio button list to default to No when the page initially loads.

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