[Vuejs]-Emit a function to get the value of :checked

0👍

use computed:

parent:

<my-component :isChecked="isAllStudentsFromClassSelected"></my-component>

computed: {
  isAllStudentsFromClassSelected(){
    return false
  }
}

child:

<input class="form-check-input class-checkbox" type="checkbox" value="" id="all-tutors" :checked="isChecked">

props: ['isChecked']

Leave a comment