Skip to content

Commit 4198f5b

Browse files
committed
fix(material-experimental/mdc-dialog): align change detection with non-MDC version (#24451)
The non-MDC dialog container uses `Default` change detection while the MDC one uses `OnPush` which causes issues for users trying to migrate. These changes align the behavior to make things easier. (cherry picked from commit 4c0a460)
1 parent 9a12eab commit 4198f5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/material-experimental/mdc-dialog/dialog-container.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import {cssClasses, numbers} from '@material/dialog';
3232
templateUrl: 'dialog-container.html',
3333
styleUrls: ['dialog.css'],
3434
encapsulation: ViewEncapsulation.None,
35-
changeDetection: ChangeDetectionStrategy.OnPush,
35+
// Disabled for consistency with the non-MDC dialog container.
36+
// tslint:disable-next-line:validate-decorators
37+
changeDetection: ChangeDetectionStrategy.Default,
3638
host: {
3739
'class': 'mat-mdc-dialog-container mdc-dialog',
3840
'tabindex': '-1',

0 commit comments

Comments
 (0)