-
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
feat(dialog): add the ability to close all dialogs #1965
Conversation
if (index > -1) { | ||
this._openDialogs.splice(index, 1); | ||
} | ||
}); |
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 would be a bit cleaner with another method:
dialogRef.afterClosed().subscribe(() => this._removeOpenDialog(dialogRef));
|
||
while (i--) { | ||
this._openDialogs[i].close(); | ||
} |
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.
I think this needs a comment like
// The `_openDialogs` property isn't updated after close until the rxjs subscription
// runs on the next microtask, so we loop through all of them and call close without
// assuming that they'll be removed from the list instantaneously.
fad16b6
to
75ac68e
Compare
Adds a `closeAll` method that closes all of the currently-open dialogs.
75ac68e
to
6d21a28
Compare
Addressed the feedback and rebased. |
LGTM |
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. |
Adds a
closeAll
method that closes all of the currently-open dialogs.