React Native: Screen is freezing issue after closing Modal by Swipe down

Viewed 316

I am having an issue in React Native, I have a screen where I have a to-do list along with search bar, on click on any todo item It opens a Modal where It has close button and content.

On closing the Modal by pressing close button, It's working fine but, when I am doing swipe down my screen is freezing, I am unable to scroll and tab on todo list item also unable to press the search bar to type.

also, on swipe down popup is closing but its not triggering onRequestClose and onDismiss

React Native Version

"react": "16.8.6",
"react-native": "0.60.5",

Modal code

creditCardsModalVisibleHandler = (visible) => {
    this.setState({creditCardsModalVisible: visible});
}

<Modal
    animationType="slide"
    transparent={false}
    visible={creditCardsModalVisible}
    presentationStyle="formSheet"
    onDismiss={() => {
        console.log('Close handled');
        this.creditCardsModalSwipeHandler();
    }}
    onRequestClose={() => {
        console.log('Modal has been closed');
        this.creditCardsModalSwipeHandler();
    }}
>
    <View style={[modal.main]}>
        <TouchableOpacity onPress={() => {this.creditCardsModalVisibleHandler(!creditCardsModalVisible);}}>
            <View style={[modal.closeButton]}>
                <ImageBackground source={modal.closeBackgroundImage} style={[modal.closeButtonImage]}/>
            </View>
        </TouchableOpacity>
    </View>
</Modal>
0 Answers
Related