I am working on a project where I have a table containing a list of checkboxes. When I click on the select all function, it selects all checkboxes including the disabled ones. However, I need to exclude the disabled checkboxes from being selected.
<li><a @click.prevent="selectAll" id="cardSelectAllAId">
Select All</a></li>
<single-checkbox class="checkbox "
inputId="card.data.id"
v-if="card.data.id"
@change="change(card.data)"
:value="card.data.selected"
:disabled="!card.data.licenseEnabled">
selectAll() {
for (let i = 0; i < this.cards.length; i += 1) {
if (this.cards[i].selected !== undefined && !this.cards[i].disabled) {
this.cards[i].selected = true;
}
},