Skip to content

Commit a4ffc5e

Browse files
authored
docs(material/chips): use defaults for input bindings (#23688)
Do not set the `selectable` and `removable` default values explicitly in the examples.
1 parent 8aef0b0 commit a4ffc5e

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

src/components-examples/material/chips/chips-autocomplete/chips-autocomplete-example.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
<mat-chip-list #chipList aria-label="Fruit selection">
44
<mat-chip
55
*ngFor="let fruit of fruits"
6-
[selectable]="selectable"
7-
[removable]="removable"
86
(removed)="remove(fruit)">
97
{{fruit}}
10-
<button matChipRemove *ngIf="removable">
8+
<button matChipRemove>
119
<mat-icon>cancel</mat-icon>
1210
</button>
1311
</mat-chip>

src/components-examples/material/chips/chips-autocomplete/chips-autocomplete-example.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import {map, startWith} from 'rxjs/operators';
1515
styleUrls: ['chips-autocomplete-example.css'],
1616
})
1717
export class ChipsAutocompleteExample {
18-
selectable = true;
19-
removable = true;
2018
separatorKeysCodes: number[] = [ENTER, COMMA];
2119
fruitCtrl = new FormControl();
2220
filteredFruits: Observable<string[]>;

src/components-examples/material/chips/chips-input/chips-input-example.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<mat-form-field class="example-chip-list" appearance="fill">
22
<mat-label>Favorite Fruits</mat-label>
33
<mat-chip-list #chipList aria-label="Fruit selection">
4-
<mat-chip *ngFor="let fruit of fruits" [selectable]="selectable"
5-
[removable]="removable" (removed)="remove(fruit)">
4+
<mat-chip *ngFor="let fruit of fruits" (removed)="remove(fruit)">
65
{{fruit.name}}
7-
<button matChipRemove *ngIf="removable">
6+
<button matChipRemove>
87
<mat-icon>cancel</mat-icon>
98
</button>
109
</mat-chip>

src/components-examples/material/chips/chips-input/chips-input-example.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ export interface Fruit {
1515
styleUrls: ['chips-input-example.css'],
1616
})
1717
export class ChipsInputExample {
18-
selectable = true;
19-
removable = true;
2018
addOnBlur = true;
2119
readonly separatorKeysCodes = [ENTER, COMMA] as const;
2220
fruits: Fruit[] = [{name: 'Lemon'}, {name: 'Lime'}, {name: 'Apple'}];

0 commit comments

Comments
 (0)