I am new to vue 3. I'm trying to use vuetify autocomplete feature in my project. I consulted the official documentation of vuetify. Autocomplete shows [object object]. Thanks in advance.
<script> import { Form, Field } from 'vee-validate'; export default { components: { Form, Field, }, setup(props) { }, data() { return { add: { id: 1, }, states: [ { name: 'Florida', id: 1 }, { name: 'Georgia', id: 2 }, { name: 'Nebraska', id: 3 }, { name: 'California', id: 4 }, { name: 'New York', id: 5 }, ], }; }, methods: { }, }; </script> <template> <v-row> <v-autocomplete v-model="add.id" :items="states" item-text="name" item-value="id" chips deletable-chips filled ></v-autocomplete> </v-row> </template>
How to display status name instead of [object object]
Add
in v-autocompletereturn-object
If you are using Vuetify 3, you should use "item-title" instead of "item-text". And I think Vuetify 2.6 is not compatible with Vue 3.
If this works for you, please provide feedback.