set focus the new way

This commit is contained in:
2023-03-13 19:41:42 +01:00
parent da4a95e5ed
commit 882f04d893
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
<div mat-dialog-content> <div mat-dialog-content>
<mat-form-field class="pdb-form-full-width"> <mat-form-field class="pdb-form-full-width">
<mat-label>Name</mat-label> <mat-label>Name</mat-label>
<input matInput [(ngModel)]="data.name" #name> <input matInput [(ngModel)]="data.name" #name focus>
</mat-form-field> </mat-form-field>
<mat-form-field class="pdb-form-full-width"> <mat-form-field class="pdb-form-full-width">
<mat-label>Description</mat-label> <mat-label>Description</mat-label>

View File

@@ -15,7 +15,7 @@ export class NewDashboardComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
window.setTimeout(() => this.nameInput.nativeElement.focus(), 0); //window.setTimeout(() => this.nameInput.nativeElement.focus(), 0);
} }
onSaveClick(): void { onSaveClick(): void {