Answer the question
In order to leave comments, you need to log in
VueJS how to select :selected in v-for loop?
There is a cycle in which all doctors are enumerated and the selected parameter is set, but why is there no display
<select v-model="disease_history.doctor" class="form-control col-2">
<option v-for="user in users" :value="user.id" :selected="user.id === disease_history.doctor.id">{>user.last_name<} {>user.last_name[0]<}.
{>user.last_name[0]<}.
</option>
</select>
user.id === disease_history.doctor.id
returnstrue
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question