Skip to content

Commit

Permalink
fix(docs): rename master to main
Browse files Browse the repository at this point in the history
Rename master to main in misc docs examples and code comments.
  • Loading branch information
zarend committed Jun 24, 2022
1 parent bd61bc3 commit bdcf329
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Checkbox Column -->
<ng-container matColumnDef="select">
<th mat-header-cell *matHeaderCellDef>
<mat-checkbox (change)="$event ? masterToggle() : null"
<mat-checkbox (change)="$event ? toggleAllRows() : null"
[checked]="selection.hasValue() && isAllSelected()"
[indeterminate]="selection.hasValue() && !isAllSelected()"
[aria-label]="checkboxLabel()">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class TableSelectionExample {
}

/** Selects all rows if they are not all selected; otherwise clear selection. */
masterToggle() {
toggleAllRows() {
if (this.isAllSelected()) {
this.selection.clear();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Checkbox Column -->
<ng-container matColumnDef="select">
<th mat-header-cell *matHeaderCellDef>
<mat-checkbox (change)="$event ? masterToggle() : null"
<mat-checkbox (change)="$event ? toggleAllRows() : null"
[checked]="selection.hasValue() && isAllSelected()"
[indeterminate]="selection.hasValue() && !isAllSelected()"
[aria-label]="checkboxLabel()">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class TableSelectionExample {
}

/** Selects all rows if they are not all selected; otherwise clear selection. */
masterToggle() {
toggleAllRows() {
if (this.isAllSelected()) {
this.selection.clear();
return;
Expand Down
2 changes: 1 addition & 1 deletion src/material/core/style/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $xsmall: 'max-width: 599px';
$small: 'max-width: 959px';

// TODO: Revisit all z-indices before beta
// z-index master list
// z-index main list

$z-index-fab: 20 !default;
$z-index-drawer: 100 !default;
Expand Down
8 changes: 4 additions & 4 deletions src/material/table/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ this.selection = new SelectionModel<MyDataType>(allowMultiSelect, initialSelecti

##### 2. Define a selection column

Add a column definition for displaying the row checkboxes, including a master toggle checkbox for
Add a column definition for displaying the row checkboxes, including a main toggle checkbox for
the header. The column name should be added to the list of displayed columns provided to the
header and data row.

```html
<ng-container matColumnDef="select">
<th mat-header-cell *matHeaderCellDef>
<mat-checkbox (change)="$event ? masterToggle() : null"
<mat-checkbox (change)="$event ? toggleAllRows() : null"
[checked]="selection.hasValue() && isAllSelected()"
[indeterminate]="selection.hasValue() && !isAllSelected()">
</mat-checkbox>
Expand All @@ -281,7 +281,7 @@ header and data row.

##### 3. Add event handling logic

Implement the behavior in your component's logic to handle the header's master toggle and checking
Implement the behavior in your component's logic to handle the header's main toggle and checking
if all rows are selected.

```js
Expand All @@ -293,7 +293,7 @@ isAllSelected() {
}

/** Selects all rows if they are not all selected; otherwise clear selection. */
masterToggle() {
toggleAllRows() {
this.isAllSelected() ?
this.selection.clear() :
this.dataSource.data.forEach(row => this.selection.select(row));
Expand Down

0 comments on commit bdcf329

Please sign in to comment.