hello guys,
i have a problem. I have made a array with checked item from ionic checkbox. now how can i remove those item from array if I uncheck one or more item
Here is my code bellow:
in html:
<ion-item style="background-color:rgb(54, 54, 54)" *ngIf="this.user?.Approver==true">
<ion-label style="color:orange">{{item.EmployeeNoName}}</ion-label>
<ion-checkbox [attr.data-TransactionId]="item.TransactionId"
[attr.data-TransactionTypeId]="item.TransactionTypeId"
[attr.data-RequestId]="item.RequestId"
[(ngModel)]="itemSelected[item.TransactionId]" (ionChange)="chkdUpdate(item)"></ion-checkbox>
</ion-item>
in ts:
chkdUpdate(item) {
console.log(item);
if (item) {
this.checkedArray.push(item);
} //this code pushing item to my checkedArray
console.log(this.checkedArray);
}
I want to remove item from checkedArray if i uncheck one or more item
please help