jeudi 9 avril 2020

vuejs v-model on multiple checkboxes

I'm having a hard time figuring out why all my checkboxes are becoming checked at once in my mapped vuejs tags.

I only want to check them one at a time but I can't remove the checkbox inputs from inside the

  • or my reference to student.someValue becomes undefined.
    <div class="modal-body modalBody" >
      <form @submit.prevent="makeExclusionGroup">
       <ul>
         <li class="listItems" v-for="(student, index) in students">
          
          <input v-model="toExclude.selected" id="student.index" :value="student.full_name" type="checkbox"> 
         </li>                  
       </ul>
     </form>
    </div>
    



  • Aucun commentaire:

    Enregistrer un commentaire