Trying in vain to get a working solution, this is the closest I have, but for some reason when I select one checkbox they all select, and when I check the box that’s supposed to check all it only does it one way all on, but not all off.
methods:{
select() {
this.selected = [];
if (this.selectAll) {
for (let i in this.loadedSwap) {
this.selected.push(this.loadedSwap[i].id);
}
}
},
}
This is my repeated checkbox in a v-for
<ion-checkbox class="mr-2 border-white" :id="swap.id" v-model="selected" number></ion-checkbox>
And my check all
<ion-checkbox class="mr-2 border-white" v-model="selectAll" @click="select"></ion-checkbox>