TotomInc / vue3-select-component

A flexible & modern select-input control for Vue 3.
https://vue3-select-component.vercel.app/
MIT License
56 stars 6 forks source link

How to get in v-model two parametrs label and value {label: label, value: value} #104

Closed fenn1ks closed 3 months ago

fenn1ks commented 3 months ago

How to get in v-model two parameters label and value {label: label, value: value} because in vue-select-component can get two parameters

TotomInc commented 3 months ago

Hi, this is not a recommended pattern. However, this was already resolved by this comment: https://github.com/TotomInc/vue3-select-component/issues/7#issuecomment-2083422621

Assuming each option has a unique value, you can create a computed value to get the active option with all your properties.

Please note that you can also use emitted events to retrieve the selected option, as per the doc: https://vue3-select-component.vercel.app/events.html