array resets back mat checkbox - angular
问题 i am trying to store the checked value in an array, it is an object since it also consists data for the row. component.html <ng-container matColumnDef="actions"> <th mat-header-cell *matHeaderCellDef> Action </th> <td mat-cell *matCellDef="let row; let i = index"> <mat-checkbox (change)="$event ? selection.toggle(row) : null" [checked]="selection.isSelected(row)"> </mat-checkbox> </td> </ng-container> component.ts close() { this.selectedData[this.data.myKey] = this.selection.myValue; this