set focus the new way
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user