mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(modal): data and role are passed to canDismiss (#26384)
resolves #26292
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user