Skip to content

Commit c0c9446

Browse files
crisbetojelbourn
authored andcommitted
build: enable all ngtsc strictness flags (#18339)
Re-enables the `strictDomLocalRefTypes` and `strictDomEventTypes`, fixes a few legitimate failures and works around the rest. (cherry picked from commit 2c4e2af)
1 parent a5c7cd5 commit c0c9446

File tree

8 files changed

+13
-7
lines changed

8 files changed

+13
-7
lines changed

src/components-examples/material/select/select-initial-value/select-initial-value-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h4>Basic mat-select with initial value</h4>
1111
<h4>Basic native select with initial value</h4>
1212
<mat-form-field>
1313
<mat-label>Favorite Car</mat-label>
14-
<select matNativeControl (change)="selectedCar = $event.target.value">
14+
<select matNativeControl (change)="selectCar($event)">
1515
<option value=""></option>
1616
<option *ngFor="let option of cars" [value]="option.value"
1717
[selected]="selectedCar === option.value">{{ option.viewValue }}</option>

src/components-examples/material/select/select-initial-value/select-initial-value-example.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ export class SelectInitialValueExample {
3131
];
3232
selectedFood = this.foods[2].value;
3333
selectedCar = this.cars[0].value;
34+
35+
selectCar(event: Event) {
36+
this.selectedCar = (event.target as HTMLSelectElement).value;
37+
}
3438
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<mat-form-field>
22
<mat-label>Filter</mat-label>
3-
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Ex. ium">
3+
<input matInput (keyup)="applyFilter($event)" placeholder="Ex. ium">
44
</mat-form-field>
55

66
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export class TableFilteringExample {
3333
displayedColumns: string[] = ['position', 'name', 'weight', 'symbol'];
3434
dataSource = new MatTableDataSource(ELEMENT_DATA);
3535

36-
applyFilter(filterValue: string) {
36+
applyFilter(event: Event) {
37+
const filterValue = (event.target as HTMLInputElement).value;
3738
this.dataSource.filter = filterValue.trim().toLowerCase();
3839
}
3940
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<mat-form-field>
22
<mat-label>Filter</mat-label>
3-
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Ex. Mia">
3+
<input matInput (keyup)="applyFilter($event)" placeholder="Ex. Mia">
44
</mat-form-field>
55

66
<div class="mat-elevation-z8">

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export class TableOverviewExample implements OnInit {
4848
this.dataSource.sort = this.sort;
4949
}
5050

51-
applyFilter(filterValue: string) {
51+
applyFilter(event: Event) {
52+
const filterValue = (event.target as HTMLInputElement).value;
5253
this.dataSource.filter = filterValue.trim().toLowerCase();
5354

5455
if (this.dataSource.paginator) {

src/dev-app/select/select-demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ <h4>Error message with errorStateMatcher</h4>
398398
<mat-card-content>
399399
<mat-form-field>
400400
<mat-label>Starter pokemon</mat-label>
401-
<mat-select (change)="latestChangeEvent = $event">
401+
<mat-select (selectionChange)="latestChangeEvent = $event">
402402
<mat-option *ngFor="let creature of pokemon" [value]="creature.value">{{ creature.viewValue }}</mat-option>
403403
</mat-select>
404404
</mat-form-field>

src/e2e-app/radio/radio-e2e.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<section>
22
<mat-radio-group [disabled]="isGroupDisabled"
3-
[(value)]="groupValue"
3+
[value]="groupValue"
44
id="test-group" aria-label="Select a Pokemon">
55

66
<mat-radio-button value="fire" id="fire">Charmander</mat-radio-button>

0 commit comments

Comments
 (0)