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

    QSelect option-value not setting to specific property, but entire object

    Framework
    options q-select v1.0
    1
    2
    315
    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.
    • M
      mlarson last edited by

      I have a QSelect componet that is not setting the v-model to my desired option-value (account_group_uuid), but the entire account_group object. Has anyone run into this? The option-label is working as expected, but not the value.

      <q-select      
        v-model="account.account_group_uuid"
        :options="accountGroups"   
        option-label="account_group"
        option-value="account_group_uuid"
        label="Account Group"
      >
      </q-select>
      

      accounGroups is an array of account_group objects. An example:

      "account_group_uuid": { "account_group_uuid": "a45ada5d-61d8-4823-a5a9-c09d97a2531b", "account_group": "Prof. Kelli Turcotte Jr.", "description": "Blanditiis rerum itaque ullam aut odio.", "account_group_data": { "1710f89b-317a-4f07-a0a9-d2fa8f965526": { "name": "aut", "type": "string", "required": false }, "29d4442b-3bd1-4187-b06b-df59fca0415a": { "name": "rerum", "type": "object", "default": { "laboriosam": "Explicabo fugit libero nesciunt porro provident quia sapiente." }, "required": true }, "7475275a-6ee2-499c-8f6f-1d35010fcf78": { "name": "est", "type": "integer", "default": 3, "required": false }, "86954e39-0400-45b1-80f0-2b958cc96a20": { "name": "autem", "type": "array", "default": [ "aut", "Qui sit earum rerum sunt est non quo libero.", "neque", true ], "required": true }, "c0d0047c-522d-4067-990e-360ab97c2943": { "name": "cumque", "type": "boolean", "default": false, "required": true } }, "created_at": "2019-04-23 19:06:05", "updated_at": "2019-04-23 19:06:05", "deleted_at": null },
      

      As you can see, the account_group_uuid is a property of that object. When I log the account, account.account_group_uuid is being set to the entire object, as mentioned. Thanks for any insights!

      1 Reply Last reply Reply Quote 0
      • M
        mlarson last edited by

        Figured out I needed emit-value and map-options

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