Hello,
There already exists the prop to specify a custom label key, but nothing for value. I'm trying to populate the select with a recordset straight from a DB, and it doesn't have a "value" field. I really don't want to have to transform the data before utilizing the select.
Thank you!
Chris
https://vue-select.org/guide/values.html#transforming-selections
The component selects an entire object by default. If you want the v-model result to just be a single key of that object, you can use reduce.
Hi. I've wasted a lot of time looking for this question, I think in the docs is not very clear the usage of reduce prop, maybe emphasizing it will replace the resultant value in the v-model would help.
In this example when your choose an option, the selection prints a number and not the country code, as it must be, it causes a lot of confusion.
Thanks.
Most helpful comment
Hi. I've wasted a lot of time looking for this question, I think in the docs is not very clear the usage of reduce prop, maybe emphasizing it will replace the resultant value in the v-model would help.
In this example when your choose an option, the selection prints a number and not the country code, as it must be, it causes a lot of confusion.
Thanks.