We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c04bd21 commit c46c49cCopy full SHA for c46c49c
src/components-examples/material/table/table-selection/table-selection-example.ts
@@ -44,9 +44,12 @@ export class TableSelectionExample {
44
45
/** Selects all rows if they are not all selected; otherwise clear selection. */
46
masterToggle() {
47
- this.isAllSelected() ?
48
- this.selection.clear() :
49
- this.dataSource.data.forEach(row => this.selection.select(row));
+ if (this.isAllSelected()) {
+ this.selection.clear();
+ return;
50
+ }
51
+
52
+ this.selection.select(...this.dataSource.data);
53
}
54
55
/** The label for the checkbox on the passed row */
0 commit comments