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

Vue 3 @input or @change not triggering function. #1728

Closed
VinceSanityyy opened this issue Dec 14, 2022 · 2 comments
Closed

Vue 3 @input or @change not triggering function. #1728

VinceSanityyy opened this issue Dec 14, 2022 · 2 comments
Labels

Comments

@VinceSanityyy
Copy link

VinceSanityyy commented Dec 14, 2022

Please respect maintainers time by filling in these sections. Your issue will likely be closed without this information.

  • Vue Version: "^3.2.41"
  • Vue Select Version: "^4.0.0-beta.6"

Describe the bug
@input or @change wont trigger functions inside the methods

  methods:{
    getOutcomes(){
        alert(1)
    }
  },

Expected behavior
Method should be called

Here is what I tried
<v-select @input="getOutcomes()" v-model="selectedOutcome" :options="curriculums" label="name" ></v-select>

@VinceSanityyy VinceSanityyy changed the title Vue 3 @click or @input not triggering function. Vue 3 @click or @input or @change not triggering function. Dec 14, 2022
@VinceSanityyy VinceSanityyy changed the title Vue 3 @click or @input or @change not triggering function. Vue 3 @input or @change not triggering function. Dec 14, 2022
@sagalbot
Copy link
Owner

There's no input event in the vue 3 version of the component, since the v-modelevent changed to update:modelValue. You can use update:modelValue instead.

@VinceSanityyy
Copy link
Author

VinceSanityyy commented Dec 14, 2022

I tried this example
@option:selected="getOutcomes" seems working. Is it similar? @sagalbot based on here #1695

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

2 participants