You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the use-case or motivation for changing an existing behavior?
In many cases, a dialog functions as a confirmation for some additional processing (such as deleting an item), which in turn asynchronously updates the interface (say, removing the item from a list once deleted serverside).
Having to wait for an animation to finish before launching the async server call introduces unnecessary latency in the UI.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material 2.0.0-beta.6
Is there anything else we should know?
Delaying until after animation is a deliberate choice, as described here: #3890, but I find that reacting instantly is also a reasonable behavior, so I propose an Observable for each.
The onBefore/closeAttempt/etc seems more concerned with how the user attempts to close the dialog, and the possibility of canceling that.
As long as it also makes the value of the choice reasonably easily available, it can pull double duty for my need, but it does seem to be semantically slightly different. (And apparently got somewhat mothballed over various standardization/accessibility issues).
@wulfsberg You're right that #3460 is really just focused on how the dialog has been closed. I'd suggest mentioning in #4647 that a beforeClose observable should emit the closing value so that your use case doesn't accidentally get forgotten here
angular-automatic-lock-bot commented on Sep 5, 2019
Activity
willshowell commentedon Jun 19, 2017
Related to #3460
[-]Add 'OnClose' Observable to MdDialogRef[/-][+]Add 'beforeClose' Observable to MdDialogRef[/+]jelbourn commentedon Jun 20, 2017
Yeah, having
beforeCloseis something we intended to do (which is why we called the existing oneafterCloseto begin with).willshowell commentedon Jun 20, 2017
Oh also #4647
jelbourn commentedon Jun 20, 2017
Ah, tracking via #4647 (thanks @willshowell)
wulfsberg commentedon Jun 20, 2017
The onBefore/closeAttempt/etc seems more concerned with how the user attempts to close the dialog, and the possibility of canceling that.
As long as it also makes the value of the choice reasonably easily available, it can pull double duty for my need, but it does seem to be semantically slightly different. (And apparently got somewhat mothballed over various standardization/accessibility issues).
willshowell commentedon Jun 20, 2017
@wulfsberg You're right that #3460 is really just focused on how the dialog has been closed. I'd suggest mentioning in #4647 that a beforeClose observable should emit the closing value so that your use case doesn't accidentally get forgotten here
angular-automatic-lock-bot commentedon Sep 5, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.