Is it possible to close react native modal by clicking on overlay when transparent option is true? Documentation doesn\'t provide anything about it
If you are using store solution like mobx or redux,
you can simply solve with the flag on store.
Below is the parent's code,
{
uiControlStore.dialogVisible = false;
}}
>
{
if (!uiControlStore.childClicked) uiControlStore.dialogVisible = false;
uiControlStore.childClicked= false;
}}
>
and below is child's code. (using mobx)
const YourCustomDialog: React.FC = observer(() => {
const { uiControlStore } = useStores();
return (
{
uiControlStore.childClicked= true;
}}
>
...
)
}