From 160abab4f132cb771a7b4c5b7fa63f9da279d53e Mon Sep 17 00:00:00 2001 From: Zach Arend Date: Fri, 24 Jun 2022 11:49:53 -0700 Subject: [PATCH] fix(docs): rename master to something else (#25151) Rename master to something else in misc docs examples and code comments. (cherry picked from commit 323359cc09a9464a2acabd232b5f86eee58015da) --- .../table-selection/table-selection-example.html | 2 +- .../mdc-table/table-selection/table-selection-example.ts | 2 +- .../table/table-selection/table-selection-example.html | 2 +- .../table/table-selection/table-selection-example.ts | 2 +- src/material/core/style/_variables.scss | 2 +- src/material/table/table.md | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.html b/src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.html index 9bf76f15a326..1a7b2d3e3867 100644 --- a/src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.html +++ b/src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.html @@ -3,7 +3,7 @@ - diff --git a/src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.ts b/src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.ts index 4bf15c0c881f..7da56a15757a 100644 --- a/src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.ts +++ b/src/components-examples/material-experimental/mdc-table/table-selection/table-selection-example.ts @@ -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; diff --git a/src/components-examples/material/table/table-selection/table-selection-example.html b/src/components-examples/material/table/table-selection/table-selection-example.html index 9bf76f15a326..1a7b2d3e3867 100644 --- a/src/components-examples/material/table/table-selection/table-selection-example.html +++ b/src/components-examples/material/table/table-selection/table-selection-example.html @@ -3,7 +3,7 @@ - diff --git a/src/components-examples/material/table/table-selection/table-selection-example.ts b/src/components-examples/material/table/table-selection/table-selection-example.ts index 4bf15c0c881f..7da56a15757a 100644 --- a/src/components-examples/material/table/table-selection/table-selection-example.ts +++ b/src/components-examples/material/table/table-selection/table-selection-example.ts @@ -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; diff --git a/src/material/core/style/_variables.scss b/src/material/core/style/_variables.scss index 0e846b1064b8..7180be33820a 100644 --- a/src/material/core/style/_variables.scss +++ b/src/material/core/style/_variables.scss @@ -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; diff --git a/src/material/table/table.md b/src/material/table/table.md index 2262512db488..778e32cb806f 100644 --- a/src/material/table/table.md +++ b/src/material/table/table.md @@ -258,14 +258,14 @@ this.selection = new SelectionModel(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 - @@ -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 @@ -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));