Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

v-autocomplete assign object to model

Here is the example of v-autocomplete Here

How can i assign the object of the each item to model of the autocomplete?

like image 564
Sam Avatar asked Jul 12 '18 13:07

Sam


1 Answers

You have to use return-object props of v-autocomplete

Like that :

<v-autocomplete
  v-model="friends"
  :disabled="isUpdating"
  :items="people"
  box
  chips
  color="blue-grey lighten-2"
  label="Select"
  item-text="name"
  return-object
  multiple>

CodePen

Vuetify Doc about v-autocomplete

like image 122
Toodoo Avatar answered Nov 11 '22 15:11

Toodoo