Skip to content

Commit 0f02a11

Browse files
authored
Revert "chore(dialog): switch to OnPush change detection (#6287)" (#6523)
This reverts commit 72360e2.
1 parent 0113c38 commit 0f02a11

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/lib/dialog/dialog-container.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
ChangeDetectorRef,
1818
ViewChild,
1919
ViewEncapsulation,
20-
ChangeDetectionStrategy,
2120
} from '@angular/core';
2221
import {animate, AnimationEvent, state, style, transition, trigger} from '@angular/animations';
2322
import {DOCUMENT} from '@angular/platform-browser';
@@ -51,7 +50,6 @@ export function throwMdDialogContentAlreadyAttachedError() {
5150
templateUrl: 'dialog-container.html',
5251
styleUrls: ['dialog.css'],
5352
encapsulation: ViewEncapsulation.None,
54-
changeDetection: ChangeDetectionStrategy.OnPush,
5553
animations: [
5654
trigger('slideDialog', [
5755
// Note: The `enter` animation doesn't transition to something like `translate3d(0, 0, 0)
@@ -119,13 +117,7 @@ export class MdDialogContainer extends BasePortalHost {
119117
}
120118

121119
this._savePreviouslyFocusedElement();
122-
123-
const componentRef = this._portalHost.attachComponentPortal(portal);
124-
125-
// Ensure that the initial view change are picked up.
126-
componentRef.changeDetectorRef.markForCheck();
127-
128-
return componentRef;
120+
return this._portalHost.attachComponentPortal(portal);
129121
}
130122

131123
/**
@@ -138,12 +130,7 @@ export class MdDialogContainer extends BasePortalHost {
138130
}
139131

140132
this._savePreviouslyFocusedElement();
141-
142-
const locals = this._portalHost.attachTemplatePortal(portal);
143-
144-
this._changeDetectorRef.markForCheck();
145-
146-
return locals;
133+
return this._portalHost.attachTemplatePortal(portal);
147134
}
148135

149136
/** Moves the focus inside the focus trap. */

0 commit comments

Comments
 (0)