[Vuejs]-How to filter data with checkbox in Vuejs with API?

0👍

You can apply change method like :

<input type="checkbox" :value="mainCat.merchantId" id="mainCat.merchantId" v-model="checkedCategories" @change="check($event)">

Methos like:

 methods: {
    check: function(e) {
        if(e.target.checked){
          console.log("load all data using service");
          // service call here
        }else{
          console.log("load required data using service");
           // service call here
       }
        
    }
  }

Leave a comment