mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
fix(react): useIonModal/useIonPopover dismiss accepts data and role (#25209)
Resolves #25208
This commit is contained in:
@ -81,8 +81,8 @@ export function useOverlay<OptionsType, OverlayType extends OverlayBase>(
|
||||
}
|
||||
}, []);
|
||||
|
||||
const dismiss = useCallback(async () => {
|
||||
overlayRef.current && (await overlayRef.current.dismiss());
|
||||
const dismiss = useCallback(async (data?: any, role?: string) => {
|
||||
overlayRef.current && (await overlayRef.current.dismiss(data, role));
|
||||
overlayRef.current = undefined;
|
||||
containerElRef.current = undefined;
|
||||
}, []);
|
||||
|
Reference in New Issue
Block a user