Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

v-autocomplete lost "change event" in vuetify 3?

In Vuetify 2 there was a change event for the v-autocomplete component. An example:

<v-autocomplete
    label="Choose stock"
    v-model="selected_stock"
    :items="current_stocks"
    :change="stockSelected"
    item-value="id" 
    item-title="name"></v-autocomplete>

stockSelected(selected_stock) {
   console.log(selected_stock);
}

In Vuetify 3 this event doesn’t seem to exist anymore. How can I track a selection change in Vuetify 3?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I guess the @change event was removed because it is redundant, you can just listen to the @update:modelValue event:

<v-autocomplete
    v-model="selected_stock"
    @update:modelValue="stockSelected"
    ...
></v-autocomplete>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading