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-select vs select

    Help
    1
    1
    527
    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.
    • S
      sninja last edited by sninja

      I would like q-select to work like this:

      # code block
      <select v-model="form.theaters">
         <option v-for="theaters in theaterList" v-bind:value="theaters"> {{theaters.name}}</option>
      </select>
      

      where theaterList is a response from server like this:

      # code block
      this.theaterList = response.data
      

      Right now, I’m doing this:

      # code block
      <q-select v-model="form.theaters" :options="theaterList"/>
      

      where theaterList is a response from server like this:

      # code block
      this.theaterList = response.data.map(t => {
         return {
           label: t.name,
           value: t
         }
      })
      

      On the table row click I want to copy the table row values to form fields with this:

      # code block
      this.form = Object.assign([], row);
      

      When using plain select it works, but when using q-select it doesn’t. What is the difference and how to achieve the same functionality?

      Thanks

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