mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-25 12:13:20 +03:00
Enabled strict template mode in Angular
Code cleanup
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="example-header">
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label i18n="Search">Search</mat-label>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)">
|
||||
<input matInput (keyup)="applyFilter($event)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ export class ModifyUsersComponent implements OnInit, AfterViewInit {
|
||||
this.pageSizeOptions = setPageSizeOptionsInput.split(',').map(str => +str);
|
||||
}
|
||||
|
||||
applyFilter(filterValue: string) {
|
||||
applyFilter(event: KeyboardEvent) {
|
||||
let filterValue = (event.target as HTMLInputElement).value; // "as HTMLInputElement" is required: https://angular.io/guide/user-input#type-the-event
|
||||
filterValue = filterValue.trim(); // Remove whitespace
|
||||
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
||||
this.dataSource.filter = filterValue;
|
||||
|
||||
Reference in New Issue
Block a user