Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stop actionsheet preventing interaction with content behind #5776

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/composites/Actionsheet/Actionsheet.tsx
Expand Up @@ -31,6 +31,7 @@ const Actionsheet = (
{...resolvedProps}
overlayVisible={disableOverlay ? false : true}
closeOnOverlayClick={disableOverlay ? false : true}
useRNModalOnAndroid={disableOverlay ? false : true}
ref={ref}
_overlay={{ style: overlayStyle }}
>
Expand Down
3 changes: 2 additions & 1 deletion src/components/composites/Modal/Modal.tsx
Expand Up @@ -39,6 +39,7 @@ const Modal = (
_slide,
_overlay,
useRNModal,
useRNModalOnAndroid = true,
...resolvedProps
} = usePropsResolution('Modal', rest);

Expand Down Expand Up @@ -84,7 +85,7 @@ const Modal = (
onRequestClose={handleClose}
isKeyboardDismissable={isKeyboardDismissable}
animationPreset={animationPreset}
useRNModalOnAndroid
useRNModalOnAndroid={useRNModalOnAndroid}
useRNModal={useRNModal}
{..._overlay}
>
Expand Down
6 changes: 6 additions & 0 deletions src/components/composites/Modal/types.ts
Expand Up @@ -86,6 +86,12 @@ export interface InterfaceModalProps extends InterfaceBoxProps<IModalProps> {
* @default false
*/
useRNModal?: boolean;
/**
* If true, renders react-native native modal (android only)
* We use RN modal on android if needed as it supports shifting accessiblity focus to the opened view. IOS automatically shifts focus if an absolutely placed view appears in front.
* @default true
*/
useRNModalOnAndroid?: boolean;
}

export type IModalComponentType = ((
Expand Down