Skip to content

Mat Dialog: beforeClosed() should have an option to cancel  #14292

Closed
@knoefel

Description

@knoefel

Bug, feature request, or proposal:

Feature Request

What is the expected behavior?

It should be possible to cancel the close event.

What is the current behavior?

It is not possible to cancel the close event.

What is the use-case or motivation for changing an existing behavior?

Use-case: Dialog with Form Model which will be sent to the server. So for example, the result of the this server call is an error, which should be displayed inside the dialog and prevent it from closing. Right now, this is only possible if I put the logic (store or service calls) inside the dialog component. This isn’t following the dumb and smart components pattern, where the logic should be put inside the container component.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 7, Angular Material 7

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P5The team acknowledges the request but does not plan to address it, it remains open for discussionarea: material/dialogfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions