components
components copied to clipboard
feat(material/dialog): support async MatDialogConfig.closePredicate
Added async support to closePredicate so dialogs can wait for confirmation or server checks before closing. The old sync behavior still works. Tests added for async true and false cases. All tests pass. Risk is low and backward compatible. Fixes issue 32142.
Aside from the breakages in the build, this is also still a breaking behavior change. The reason we haven't done this ourselves is that by making the callback asynchronous, we can't guarantee the closing order anymore which can come up when opening multiple dialogs on top of each other.