Answer the question
In order to leave comments, you need to log in
How can vuetify autocomplete or combobox display multiple record fields and search by them?
How can vuetify autocomplete or combobox display multiple record fields and search by them?
For example
one entry => id:2 name:lolo surname:lolololo
item-text="[id,name,last_name]" - not an option
<!-- в данном варианте он ищет по одному полю и выводит id не из v-model -->
<v-flex xs12 sm12 md6 lg6>
<v-combobox
:items="users"
v-model="$parent.searchParam.users"
label="Пользователи"
item-text="name"
item-value="id"
prepend-icon="people"
multiple
>
<template
slot="item"
slot-scope="data"
>
<template>
<v-list-tile-content>
<v-list-tile-title>{{data.item.id}} {{data.item.name}} {{data.item.last_name}}</v-list-tile-title>
</v-list-tile-content>
</template>
</template>
</v-combobox>
</v-flex>
<v-flex xs12 sm12 md6 lg6>
<v-autocomplete
:items="users"
v-model="$parent.searchParam.users"
label="Пользователи"
item-text="name"
item-value="id"
prepend-icon="people"
multiple
/>
</v-flex>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question