You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
Version
4.1.0
Environment
Vue 3.2.47
Reproduction link
Steps to reproduce
See the link
What is expected?
I will see the first item as selected by default
What is actually happening?
See the link
The value specified in formData.organizations should be displayed as the first selected element in the selector
I thought that the values specified in :options would be compared with the values specified in v-model:value, in fact this is what happens, but the data specified in :field-names="{ label: 'name', value: 'id' }" do not affect the first selected item by default
The text was updated successfully, but these errors were encountered:
необходимо установить formData.organizations=['1'], потому что v-model:value просто привязывает выбранное значение
Thanks for the answer, it really works. But then I don't understand what are the label-in-value and field-names properties needed for?
I'll explain the case, I want to get data from the backend in the { id: "1", name: "First" } format, and just transfer them to the select, without doing unnecessary manipulation to transform the data, and after selecting the desired value, also give the data in the { id: "1", name: "First" } format
Version
4.1.0
Environment
Vue 3.2.47
Reproduction link
Steps to reproduce
See the link
What is expected?
I will see the first item as selected by default
What is actually happening?
See the link
The value specified in
formData.organizations
should be displayed as the first selected element in the selectorI thought that the values specified in
:options
would be compared with the values specified inv-model:value
, in fact this is what happens, but the data specified in:field-names="{ label: 'name', value: 'id' }"
do not affect the first selected item by defaultThe text was updated successfully, but these errors were encountered: