0

Here bellow the code to loop the elements of teamLeaderOfWithDescendants

<option :value="item.user_id" v-for="item in teamLeaderOfWithDescendants">
   {{item.user_full_name}}
</option>

How to put the row where the item.user_id === currentUserId in the first position ?

Mostafa Abdellaoui
  • 355
  • 1
  • 6
  • 15

1 Answers1

0

I thinks I found it ! :selected="currentUserId === item.user_id"

<option
:selected="currentUserId === item.user_id"
:value="item.user_id" 
v-for="item in teamLeaderOfWithDescendants">
{{item.user_full_name}}
</option>
Mostafa Abdellaoui
  • 355
  • 1
  • 6
  • 15