From 197926fe6121786bb1e278cceda5d8328045f049 Mon Sep 17 00:00:00 2001 From: "mikerodonnell89@gmail.com" Date: Thu, 10 Oct 2024 15:22:18 -0400 Subject: [PATCH] fix(core): remove OnPush from dialog container --- .../dialog-container/dialog-container.component.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/libs/core/dialog/dialog-container/dialog-container.component.ts b/libs/core/dialog/dialog-container/dialog-container.component.ts index cd5e731a6cc..f58de436575 100644 --- a/libs/core/dialog/dialog-container/dialog-container.component.ts +++ b/libs/core/dialog/dialog-container/dialog-container.component.ts @@ -1,8 +1,6 @@ import { AnimationEvent } from '@angular/animations'; import { - AfterContentChecked, AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentRef, @@ -41,13 +39,12 @@ import { dialogFade } from '../utils/dialog.animations'; styleUrl: './dialog-container.component.scss', animations: [dialogFade], encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [PortalModule] }) export class DialogContainerComponent extends DynamicComponentContainer - implements DialogContainer, AfterViewInit, AfterContentChecked, CssClassBuilder + implements DialogContainer, AfterViewInit, CssClassBuilder { /** Custom classes */ @Input() @@ -109,13 +106,6 @@ export class DialogContainerComponent }); } - /** @hidden */ - ngAfterContentChecked(): void { - if (this.portalOutlet) { - this._cdr.markForCheck(); - } - } - /** @hidden */ protected _attached(event: CdkPortalOutletAttachedRef): void { if (event instanceof ComponentRef) { @@ -138,7 +128,6 @@ export class DialogContainerComponent this._createFromDefaultDialog(this.childContent); } this._animationStateSignal.set('visible'); - this._cdr.detectChanges(); } /** @hidden Returns context for embedded template*/ @@ -161,7 +150,6 @@ export class DialogContainerComponent private _listenOnClose(): void { const callback: () => void = () => { this._animationStateSignal.set('hidden'); - this._cdr.detectChanges(); }; this.ref.afterClosed.pipe(takeUntilDestroyed(this._destroyRef)).subscribe({ next: () => callback(),