Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vuetify Autocomplete, accept value outside list

I have a vuetify autocomplete component that displays a list of names that the user selects from. I would like a fallback case where if the user enters something not on the list that value is still accepted. Here is my code:

<v-autocomplete
v-model="model.name"
:items="users"
placeholder="Enter your name"
no-data-text="Name not Found"
clearable
></v-autocomplete>

Where the value of the autocomplete is bound to a data variable and the items is an array coming from my server. The autocomplete component is part of a larger form that accepts submissions of data

like image 723
micheal Avatar asked Oct 22 '25 23:10

micheal


1 Answers

you can try using v-combobox instead of v-autocomplete. v-combobox accept values entered by user that do not exist within provided items.

src: https://vuetifyjs.com/en/components/combobox/

like image 64
Luthfiarfi Avatar answered Oct 25 '25 14:10

Luthfiarfi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!