I am attempting to create a dropdown menu using this library, but I'm struggling because I need to retrieve information from the selected option and then call another function to add a row to a table. I am currently working with Vue.js 3 and the composition API.
I have found that if I use the following code:
<v-select :value="selected" :options="getAllItems" label="name" @change="setSelected($event)"></v-select>
I am able to select an option and display it in my select box, however the `setSelected` function is not being triggered. I would like for this function to receive all of the information from the selected option.
Here is my `setSelected` function:
const setSelected = (event) => {
console.log(event.target)
}
If I use
<v-select v-model="selected" :options="getAllItems" label="name" @change="setSelected($event)"></v-select>
, the selected option is never displayed in the input field and the function cannot be called... This is my first experience with this library.
Thank you for your assistance and I apologize for any language errors in my message.