You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to run a function when the user arrows through the items in a v-select or v-autocomplete but hasn't actually clicked or selected one yet. For example, if I have a v-autocomplete with the :items="['Arizona', 'California', 'Iowa'] the user focuses on the v-autocomplete and types 'a' and hits the down arrow to highlight Arizona, then my function runs and displays 'AZ' inside a span on the page. Hit down arrow again to highlight California and the function runs and the span changes to 'CA'. But the v-model value doesn't change and the update:modelValue hasn't fired.
I thought maybe something with update:menu, but either I did it wrong or that wasn't the answer.
Any ideas? I know in my trivial example I could just change the way the options are displayed, but that isn't what I'd like to do and I'm also just curious if this capability exists.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'd like to run a function when the user arrows through the items in a v-select or v-autocomplete but hasn't actually clicked or selected one yet. For example, if I have a v-autocomplete with the
:items="['Arizona', 'California', 'Iowa']
the user focuses on the v-autocomplete and types 'a' and hits the down arrow to highlight Arizona, then my function runs and displays 'AZ' inside a span on the page. Hit down arrow again to highlight California and the function runs and the span changes to 'CA'. But the v-model value doesn't change and the update:modelValue hasn't fired.I thought maybe something with update:menu, but either I did it wrong or that wasn't the answer.
Any ideas? I know in my trivial example I could just change the way the options are displayed, but that isn't what I'd like to do and I'm also just curious if this capability exists.
Beta Was this translation helpful? Give feedback.
All reactions