<template >
<v-select
searchable=""
:dir="$vs.rtl ? 'rtl' : 'ltr'"
:options="AccountStatusJson"
v-model="Model.AccountStatus"
label="Code"
class="mt-5 w-full">
<template v-slot:option="option">
<span>{{ $t(option.Code) }}</span>
</template>
</v-select>
</template>

I have this example above
i get Values from JSON file and in the span i get the values from Vi18n depends on the code, but in the select (when i select any of them ) i cant print the value in the Span
up there in label="Code" it print the code in the JSON and if i put Value it print the Value
but i cant use ($t) in it to get the value from i18n or use the value in the span as i get it from the vi18n
<v-select>
<template v-slot:selected-option="option">
{{ $t(option.Code) }}
</template>
</v-select>
鈽濓笍 that should be what you're looking for.
value doesnt update...
if i choose on and then choose another one it doesn't change
Can you post a reproduction link? Really hard to debug without one.
how to do this ... ?
can we do it trough team viewer ?
Could you make a simple reproduction at https://codepen.io/?
check this please
https://codepen.io/hanigerges/pen/abOMRqq
after first value selected i cant change it till i press on clear selected
and value doesnt appear in dropdown
Thanks for the reproductin! You can solve this with getOptionLabel .
https://vue-select.org/api/props.html#getoptionlabel
<v-select :options="options" :get-option-label="option => $t(option.Code)"></v-select>
Thx alot, i will try it tomorrow.... <3
Thanks for the reproductin! You can solve this with
getOptionLabel.https://vue-select.org/api/props.html#getoptionlabel
<v-select :options="options" :get-option-label="option => $t(option.Code)"></v-select>
You save my day sir! THANK YOU! 馃槏
Most helpful comment
Thanks for the reproductin! You can solve this with
getOptionLabel.https://vue-select.org/api/props.html#getoptionlabel
https://codepen.io/sagalbot/pen/jOPRPQM?editors=1010