Strict done!!
This commit is contained in:
+2
-2
@@ -14,7 +14,7 @@ import { ProductGroupService } from '../product-group.service';
|
||||
export class ProductGroupDetailComponent implements OnInit, AfterViewInit {
|
||||
@ViewChild('nameElement', { static: true }) nameElement?: ElementRef;
|
||||
form: FormGroup;
|
||||
item: ProductGroup;
|
||||
item: ProductGroup = new ProductGroup();
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
@@ -45,7 +45,7 @@ export class ProductGroupDetailComponent implements OnInit, AfterViewInit {
|
||||
|
||||
ngAfterViewInit() {
|
||||
setTimeout(() => {
|
||||
this.nameElement.nativeElement.focus();
|
||||
if (this.nameElement) this.nameElement.nativeElement.focus();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user