components icon indicating copy to clipboard operation
components copied to clipboard

feat(material/dialog): support async MatDialogConfig.closePredicate

Open Mr-KRAMA opened this issue 3 weeks ago • 1 comments

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.

Mr-KRAMA avatar Dec 01 '25 15:12 Mr-KRAMA

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.

crisbeto avatar Dec 01 '25 16:12 crisbeto