I am using a v-autocomplete component:
<v-autocomplete
v-model="fromPrice"
:items="listOfFromItems"
dense
solo
label="from"
hide-details
return-object
color="red darken-1"
/>
To populate the v-autocomplete, I have created a list like this:
for (let i = 0; i <= 5000; i += 50) {
this.listOfFromItems = [...this.listOfFromItems, i];
}
[0, 50, 100, 150.......5000]
My goal is to ensure that when a number is typed into the autocomplete that is not in the array, such as 12, the value of the v-autocomplete will be set to the entered number 12. Any advice on how to achieve this would be greatly appreciated :)