Can the v-model
data be different from the default option in this scenario?
data: function() {
return {
user: {
usertype: {},
}
}
<select v-model="user.usertype" class="btn btn-secondary d-flex header-input">
<option
v-for="(usertype, index) in usertypes"
:key="index"
:value="{value: usertype['short_desc_'+locale], max_user: usertype['max_user']}"
>{{usertype['short_desc_'+locale]}}</option>
I attempted to add another disabled option with value=""
but it was not selected as the default. It seems like it doesn't display. When I open the drop-down menu, the first item is already checked but not visible when closed. Any assistance is welcomed :)
Edit: Structure of usertypes
[{"id":1,"short_desc_de":"Mann","short_desc_en":"Men","min_user":1,"max_user":1,"created_at":"2019-09-19 08:07:06","updated_at":"2019-09-19 08:07:06"},{"id":2,"short_desc_de":"Frau","short_desc_en":"Woman","min_user":1,"max_user":1,"created_at":"2019-09-19 08:07:06","updated_at":"2019-09-19 08:07:06"},...]