Closed jiwidi closed 3 months ago
Please respect maintainers time by filling in these sections. Your issue will likely be closed without this information.
Describe the bug The select is not emitting the input event when options as selected in the select.
I have this vue component:
<template> <div> <h2>Mount:</h2> <v-select v-model="selectedMounts" :options="mounts" multiple @input="emitFilter" placeholder="Select mount(s)"> </v-select> </div> </template> <script> import vSelect from "vue-select"; export default { components: { vSelect }, props: { mounts: Array, }, emits: ['updateFilter'], data() { return { selectedMounts: [] }; }, methods: { emitFilter() { console.log("Input changed") this.$emit('updateFilter', this.selectedMounts); }, reset() { this.selectedMounts = []; } } }; </script> <style> @import 'vue-select/dist/vue-select.css'; </style>
Where i expect vue-select to call emitFilter anytime that a new option in the select is adde/removed. But is not being called whatsoever, cant see any logs.
From the documentation I understood this should be the way to code this https://vue-select.org/api/events.html#input. But maybe i'm missing something?
Nvm! It was option:selecting that i should be listening to.
Describe the bug The select is not emitting the input event when options as selected in the select.
I have this vue component:
Where i expect vue-select to call emitFilter anytime that a new option in the select is adde/removed. But is not being called whatsoever, cant see any logs.
From the documentation I understood this should be the way to code this https://vue-select.org/api/events.html#input. But maybe i'm missing something?