Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@input event do not work #1619

Closed
SchmidtDawid opened this issue Apr 2, 2022 · 10 comments
Closed

@input event do not work #1619

SchmidtDawid opened this issue Apr 2, 2022 · 10 comments
Labels

Comments

@SchmidtDawid
Copy link

SchmidtDawid commented Apr 2, 2022

  • Vue Version: ^3.2.13
  • Vue Select Version: 4.0.0-beta.

Describe the bug
input event does not fire after option is selected

<v-select
  v-model="device.configuration.deviceConfig.actionConfigSource"
  :options="fileList"
  :reduce="(option) => option.value"
  @input="onFileChange"
/>
@nowaysgit
Copy link

  • @input and :value don't work...(
    If you set :value nothing happens after the change

You can try
@option:selected="onFileChange"
fuction onFileChange(val) {}

@SchmidtDawid SchmidtDawid changed the title @input event do now work @input event do not work Apr 4, 2022
@mkalantar
Copy link

read here #1597

value renamed to modelValue to match the Vue 3 v-model syntax
@input event renamed to update:modelValue

@sagalbot
Copy link
Owner

sagalbot commented Apr 6, 2022

Thanks for providing that info @mkalantar!

@sagalbot sagalbot closed this as completed Apr 6, 2022
@LizAinslie
Copy link

It'd be really nice to have this documented somewhere. I struggled for two hours thinking this was an issue with my own code and then I found this issue and after renaming the event & prop, everything works. I'm sure this isn't the first time this has happened either, given this issue was opened on April 2nd; It'd be nice to not have such headaches :)

@coleman-benjamin
Copy link

Bumping this thread, having this documented would also have saved me a couple of hours of headache!

@LizAinslie
Copy link

Been a few months, so I'm bumping this again since it's fresh, though only to save others' headaches. Since I've already implemented my own solution, it's not of much use to me personally. However, I can imagine having documentation of such an unusual deviation from the norm would surely benefit countless others

@miksony
Copy link

miksony commented Mar 7, 2023

I was able to find solution with using


<v-select
:options="options"
:model-value="value"
@option:selected="(selected) => { value = selected; }"
>
</v-select>

@marbled-ky-pnt
Copy link

marbled-ky-pnt commented Apr 3, 2023

I was able to find solution with using


<v-select
:options="options"
:model-value="value"
@option:selected="(selected) => { value = selected; }"
>
</v-select>

It's working for Vue3 . thanks so much !!

@Crovitche-1623
Copy link

This change should be also changed in the documentation https://vue-select.org/api/events.html#input.

@adamreisnz
Copy link

adamreisnz commented Aug 24, 2024

Can't believe this still hasn't been updated in the docs two years later?
It's a pretty critical breaking change going from Vue 2 to Vue 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants