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



  • 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!



  • Figured out I needed emit-value and map-options


Log in to reply