I am currently using v-select/v-autocomplete in my project:
<v-autocomplete
v-modal="newRole"
:items="roles"
label="--Change role--"
required
return-object
item-value="id"
item-text="name"
@input="changeRole(row.id, newRole)"
@blur="$v.form.roles.$touch()"
>
</v-autocomplete>
When I try to change the value of the dropdown, I am encountering an issue where the selected value is coming up as undefined.
export default {
data() {
return {
roles:[{name: 'Admin', id:'1'}],
newRole:null,
}
},
methods: {
changeRole(id, selected){
alert(selected)
},
}
If anyone has any insights or solutions to this problem, your help would be greatly appreciated!