I got an app that uses a schema to define the columns of an editable mat-table.
The problem is that when I click the pencil, the checkboxes aren't clickable. For more details, I suggest you go see the stackblitz project.
In editing mode :
CodePudding user response:
The example is in Angular 15
change the following thing, this should make the checkbox work
<tr
mat-row
*matRowDef="let row; columns: displayedColumns"
(click)="clickedRows.add(row)"
[class.highlightTableColor]="clickedRows.has(row)"
></tr>
clickedRows = new Set<model>();
or remove the return statement from the highlight method
highlight(row: { ID: number }) {
if (!this.editing) this.selectedID = row.ID;
}