-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(snack-bar): clean up element when associated viewContainer is destroyed #2219
Conversation
…troyed Fixes the snack bar not being removed from the DOM when it's associated `viewContainerRef` gets destroyed. Fixes angular#2190.
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.
LGTM, one minor comment. Add the merge_ready
label when done
@@ -62,6 +59,13 @@ export class MdSnackBarRef<T> { | |||
} | |||
} | |||
|
|||
/** Cleans up the DOM after closing. */ | |||
private _cleanup(): void { |
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.
Let's call this _finishDismiss
…t succession Fixes a runtime error being thrown by Angular when opening multiple snack bars, that have a timeout, in quick succession. The fix waits for the zone to settle before firing the final callbacks. **Note on testing:** This change is missing a unit test, because I couldn't find a way to trigger the error during tests, however the approach is similar to angular#2219. Fixes angular#2390.
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 the snack bar not being removed from the DOM when it's associated
viewContainerRef
gets destroyed.Fixes #2190.