Having some issues with vue select. I have a function that should return the id as the value and display the text as an option, but it is currently returning the full object of the selected value. For instance:
I am fetching selectable options from my backend which look like this:
{
"id": 179,
"name": "Poland",
"text": "Poland",
"value": "Poland"
},
{
"id": 100,
"name": "Hungary",
"text": "Hungary",
"value": "Hungary"
},
{
"value": "select_value"
}
My vue select element is structured like this:
<v-select id="country" v-model="product_info.country" :options="activeCountries" :selectable="option => ! option.value.includes('select_value')" label="text" />
And Vue is returning the entire object of the selected value, such as:
"country":{
"id":100,
"name":"Hungary",
"text":"Hungary",
"value":"Hungary"
},
How can I specify in the select form to only return the id, for example:
"country":100
I understand there might be an issue with my v-select setup, but if you believe the problem lies elsewhere in the code, please let me know so I can provide additional information.