Skip to content

Commit 323359c

Browse files
authored
fix(docs): rename master to something else (angular#25151)
Rename master to something else in misc docs examples and code comments.
1 parent 74b0c5f commit 323359c

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- Checkbox Column -->
44
<ng-container matColumnDef="select">
55
<th mat-header-cell *matHeaderCellDef>
6-
<mat-checkbox (change)="$event ? masterToggle() : null"
6+
<mat-checkbox (change)="$event ? toggleAllRows() : null"
77
[checked]="selection.hasValue() && isAllSelected()"
88
[indeterminate]="selection.hasValue() && !isAllSelected()"
99
[aria-label]="checkboxLabel()">

src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class TableSelectionExample {
4343
}
4444

4545
/** Selects all rows if they are not all selected; otherwise clear selection. */
46-
masterToggle() {
46+
toggleAllRows() {
4747
if (this.isAllSelected()) {
4848
this.selection.clear();
4949
return;

src/components-examples/material/table/table-selection/table-selection-example.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- Checkbox Column -->
44
<ng-container matColumnDef="select">
55
<th mat-header-cell *matHeaderCellDef>
6-
<mat-checkbox (change)="$event ? masterToggle() : null"
6+
<mat-checkbox (change)="$event ? toggleAllRows() : null"
77
[checked]="selection.hasValue() && isAllSelected()"
88
[indeterminate]="selection.hasValue() && !isAllSelected()"
99
[aria-label]="checkboxLabel()">

src/components-examples/material/table/table-selection/table-selection-example.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class TableSelectionExample {
4343
}
4444

4545
/** Selects all rows if they are not all selected; otherwise clear selection. */
46-
masterToggle() {
46+
toggleAllRows() {
4747
if (this.isAllSelected()) {
4848
this.selection.clear();
4949
return;

src/material/core/style/_variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $xsmall: 'max-width: 599px';
44
$small: 'max-width: 959px';
55

66
// TODO: Revisit all z-indices before beta
7-
// z-index master list
7+
// z-index main list
88

99
$z-index-fab: 20 !default;
1010
$z-index-drawer: 100 !default;

src/material/table/table.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,14 @@ this.selection = new SelectionModel<MyDataType>(allowMultiSelect, initialSelecti
258258

259259
##### 2. Define a selection column
260260

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

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

282282
##### 3. Add event handling logic
283283

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

287287
```js
@@ -293,7 +293,7 @@ isAllSelected() {
293293
}
294294

295295
/** Selects all rows if they are not all selected; otherwise clear selection. */
296-
masterToggle() {
296+
toggleAllRows() {
297297
this.isAllSelected() ?
298298
this.selection.clear() :
299299
this.dataSource.data.forEach(row => this.selection.select(row));

0 commit comments

Comments
 (0)