From e19e6157e182b2f7d46fca3643f2f0b4f77081e7 Mon Sep 17 00:00:00 2001 From: Jalinson Diaz Date: Fri, 19 Apr 2024 08:58:10 -0300 Subject: [PATCH] Update dot-wizard.component.ts (#28290) --- .../components/_common/dot-wizard/dot-wizard.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core-web/apps/dotcms-ui/src/app/view/components/_common/dot-wizard/dot-wizard.component.ts b/core-web/apps/dotcms-ui/src/app/view/components/_common/dot-wizard/dot-wizard.component.ts index 7b152d58b313..cddb21d59e4c 100644 --- a/core-web/apps/dotcms-ui/src/app/view/components/_common/dot-wizard/dot-wizard.component.ts +++ b/core-web/apps/dotcms-ui/src/app/view/components/_common/dot-wizard/dot-wizard.component.ts @@ -1,6 +1,7 @@ import { Subject } from 'rxjs'; import { + ChangeDetectorRef, Component, ComponentFactoryResolver, ComponentRef, @@ -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); });