Created
November 1, 2018 11:59
-
-
Save StickNitro/88379c4cd33dd3f766c3c9f4528cfc37 to your computer and use it in GitHub Desktop.
mat-table-multi-select-column
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ng-container matColumnDef="select"> | |
<mat-header-cell *matHeaderCellDef> | |
<mat-checkbox (change)="$event ? masterToggle() : null" [checked]="selection.hasValue() && isAllSelected()" | |
[indeterminate]="selection.hasValue() && !isAllSelected()"></mat-checkbox> | |
</mat-header-cell> | |
<mat-cell *matCellDef="let row"> | |
<mat-checkbox [checked]="selection.isSelected(row)" (click)="$event.stopPropagation()" | |
(change)="$event ? selection.toggle(row) : null"></mat-checkbox> | |
</mat-cell> | |
</ng-container> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment