[Vuejs]-Bind Combobox to Array in VueJs

0👍

You said that you have a dynamic list of workshop.

Iterate on it then :

<div v-for="(workshop, index) in workshops" :key="index" >    
<input type="checkbox" v-model="workshop.selected">
{{workshop.name}}
<select v-model="workshop.status">
<option value="P">Participant</option>
<option value="G">Guest</option>
</div>

Instead of using v-model for the checkbox, maybe you should bind a function to @input that push when true, and splice when false

Leave a comment