vue-search-select
vue-search-select copied to clipboard
how to get change value
i want to get every time @change value into a console. how i get?
I have this
<template> <model-select :options="options" v-model="changeEvent" placeholder="select item"> </model-select> </template>
and ` import {ModelSelect} from 'vue-search-select'
export default {
components: {
ModelSelect
},
data() {
return {
value: '',
changeEvent: this.value,
options: []
}
},
watch: {
changeEvent(val) {
// eslint-disable-next-line no-console
console.log(val);
}
}
}
`
Use @input="myChange"
I added the documentation here #183 , you can use @searchchange event
you can take a look at usage example here btw https://github.com/moreta/vue-search-select/blob/main/docs/src/views/ModelAjax.vue