Better know a framework #11 prevent dialog close

You never know what can come up when you are reading through issues.
Today a feature request came in for dialog plugin

And like microsoft office team says it: most of the stuff people ask us to implement is already there.

Who new that dialog has lifecicle hooks?
It is even documented : aurelia dialog plugin lifecycle hooks

you can use .canDeactivate() to validate and cancel closing…

Don’t do it on esc though… that’s just mean if not a prank (-:

1 Like

Good catch allthough the issue was actually more geared towards providing a dialogresult on enter and escape keys as they by default just call ok/cancel from the Dialogcontroller without passing any result.

Nevertheless great Tip with using candeactivate for validations

1 Like

I wonder if there would be a <form> would those go towards form submit/reset?