Skip to content

Commit

Permalink
Update dot-wizard.component.ts (#28290)
Browse files Browse the repository at this point in the history
  • Loading branch information
zJaaal authored Apr 19, 2024
1 parent d485655 commit e19e615
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Subject } from 'rxjs';

import {
ChangeDetectorRef,
Component,
ComponentFactoryResolver,
ComponentRef,
Expand Down Expand Up @@ -56,14 +57,18 @@ export class DotWizardComponent implements OnDestroy {
constructor(
private componentFactoryResolver: ComponentFactoryResolver,
private dotMessageService: DotMessageService,
private dotWizardService: DotWizardService
private dotWizardService: DotWizardService,
private cd: ChangeDetectorRef
) {
this.dotWizardService.showDialog$.pipe(takeUntil(this.destroy$)).subscribe((data) => {
this.data = data;

// need to wait to render the dotContainerReference.
this.cd.detectChanges();
setTimeout(() => {
this.loadComponents();
this.setDialogActions();
this.cd.detectChanges();
this.focusFistFormElement();
}, 1000);
});
Expand Down

0 comments on commit e19e615

Please sign in to comment.