-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(material/bottom-sheet): changed after checked error with zoneless #29277
Conversation
Fixes that when closing and immediately reopening bottom sheet in a zoneless app, we were causing a "changed after checked" error to be thrown. It seems to be because we were calling `detectChanges` without marking for check first. Fixes angular#29258.
@@ -92,15 +92,17 @@ export class MatBottomSheetContainer extends CdkDialogContainer implements OnDes | |||
this._breakpointSubscription = breakpointObserver | |||
.observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge]) | |||
.subscribe(() => { | |||
this._toggleClass( | |||
const classList = (this._elementRef.nativeElement as HTMLElement).classList; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is unrelated to the fix, I just figured it's a good chance for a cleanup.
…angular#29277) Fixes that when closing and immediately reopening bottom sheet in a zoneless app, we were causing a "changed after checked" error to be thrown. It seems to be because we were calling `detectChanges` without marking for check first. Fixes angular#29258.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes that when closing and immediately reopening bottom sheet in a zoneless app, we were causing a "changed after checked" error to be thrown. It seems to be because we were calling
detectChanges
without marking for check first.Fixes #29258.