Hello, on ion-checkbox how can we limit the number of maximum checked boxes to 5?
This mean the other box will not be able to be checked unless the user deselect a box.
We need the code if possible thanks.
We tried this:
<ion-checkbox [(ngModel)]=“lst.checked” (ionChange)=“handleOnCheckEvent(lst2)”>
handleOnCheckEvent(lst){
//arry contain the cheked element
if( this.arry.length > 5 ){
lst.checked=false;
}
}
It’s not a good solution us it let the user select the box and than deselect it .