I'm new to React Native. I've added a modal to my app and I want it to be closed when I click outside the modal. But nothing happens when I click out of the modal.
Here is my code
import React from 'react';import { View, Text, TouchableWithoutFeedback } from 'react-native';import { Button } from 'react-native-elements';import Modal from 'react-native-modal';import { style } from './style';const MenuTask = ({ isVisible, onDisapearCallBack }) => (<TouchableWithoutFeedback onPress={() => onDisapearCallBack()}><Modal isVisible={isVisible} animationIn={'zoomInDown'} animationOut={'zoomOutUp'} animationInTiming={1000} animationOutTiming={1000} backdropTransitionInTiming={1000} backdropTransitionOutTiming={1000}><TouchableWithoutFeedback><View style={style.modal}><View style={style.textView}><Text style={style.modalTitle}>Que souhaitez vous faire sur la tâche ?</Text></View><View style={style.buttonView}><Button buttonStyle={style.buttonDelete} title = "Supprimer" onPress={() => onDisapearCallBack()} /><Button buttonStyle={style.buttonChangeStatus} title = "Changer status" onPress={() => onDisapearCallBack()} /></View></View></TouchableWithoutFeedback></Modal></TouchableWithoutFeedback>);export default MenuTask;
Please could you help me to figure this out. Thanks a lot :)