feat(modal): data and role are passed to canDismiss (#26384)

resolves #26292
This commit is contained in:
Liam DeBeasi
2022-12-02 10:46:41 -05:00
committed by GitHub
parent 5d035abdb0
commit 1b30fc97d3
7 changed files with 66 additions and 17 deletions

View File

@@ -507,7 +507,7 @@ export const dismiss = async <OverlayDismissOptions>(
: config.get(name, mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
// If dismissed via gesture, no need to play leaving animation again
if (role !== 'gesture') {
if (role !== GESTURE) {
await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
}
overlay.didDismiss.emit({ data, role });
@@ -612,3 +612,4 @@ export const safeCall = (handler: any, arg?: any) => {
};
export const BACKDROP = 'backdrop';
export const GESTURE = 'gesture';