Skip to content

Commit 3737b52

Browse files
authored
ChangeDetectionStrategy updated to correctly detect changes
Change to match official bottom-sheet ChangeDetectionStrategy. angular/components#21175
1 parent 0bf6a1d commit 3737b52

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

projects/right-sheet/src/lib/right-sheet.container.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ import { MatRightSheetConfig } from './right-sheet.config';
4040
selector: 'mat-right-sheet-container',
4141
templateUrl: './right-sheet.container.html',
4242
styleUrls: ['./right-sheet.container.scss'],
43-
changeDetection: ChangeDetectionStrategy.OnPush,
43+
// In Ivy embedded views will be change detected from their declaration place, rather than where
44+
// they were stamped out. This means that we can't have the bottom sheet container be OnPush,
45+
// because it might cause the sheets that were opened from a template not to be out of date.
46+
// tslint:disable-next-line:validate-decorators
47+
changeDetection: ChangeDetectionStrategy.Default,
4448
// tslint:disable-next-line: use-view-encapsulation
4549
encapsulation: ViewEncapsulation.None,
4650
animations: [matRightSheetAnimations.rightSheetState],

0 commit comments

Comments
 (0)