angular-mdc-web
angular-mdc-web copied to clipboard
Dialog - add ability to fail on beforeClose to prevent closing dialog / missing documentation
It would be nice if dialog.beforeEach() could be used to do e.g. some validation. if it fails then the dialog should not be closed.
Scenario: dialog as a create/update form on beforeClose I would like to check if value already exists. If it does then I would like to cancel closing the dialog.
Also the beforeClose is missed in official documentation
PS I know I could achieve this within dialog. But what I have is a dummy dialog with form. I handle api calls in class which opens the dialog.