[Vuejs]-How to concatenate two fields in v-autocomplete item-text vuetify

13👍

Use a function to render the item-text.

:item-text="getItemText"

Then, in your methods:

getItemText(item) {
    return `${item.first_value} ${item.second_value}`;
}

2👍

item-text can accept a function

:item-text="item => `${item.first_value} ${item.second_value}`"

The first answer is correct however you can use this if you do not want to declare another function

Leave a comment