Skip to content

Commit

Permalink
fix(material-experimental/mdc-dialog): align change detection with no…
Browse files Browse the repository at this point in the history
…n-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)
  • Loading branch information
crisbeto committed Feb 20, 2022
1 parent 9a12eab commit 4198f5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/material-experimental/mdc-dialog/dialog-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ import {cssClasses, numbers} from '@material/dialog';
templateUrl: 'dialog-container.html',
styleUrls: ['dialog.css'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
// Disabled for consistency with the non-MDC dialog container.
// tslint:disable-next-line:validate-decorators
changeDetection: ChangeDetectionStrategy.Default,
host: {
'class': 'mat-mdc-dialog-container mdc-dialog',
'tabindex': '-1',
Expand Down

0 comments on commit 4198f5b

Please sign in to comment.