question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

backdropOpacity and backdropColor not working

See original GitHub issue

Modal from react-native-modal is so good for my old project. But today, i create new app and backdropOpacity and backdropColor not working.

Issue Image

Here is my code:

<Modal onBackdropPress = {()=>this.setState({isVisible: false})} onBackButtonPress = {()=>this.setState({isVisible: false})} visible={this.state.isVisible} onRequestClose = {()=> null} style={{marginTop: 56, marginRight: 1, marginLeft: 20, marginBottom:50}}

            <View style={{flex:1, backgroundColor:'white'}}>
                <View style={{height: 10, flexDirection: 'row', paddingLeft: 10}}>
                    <Text style={{alignSelf: 'flex-start', fontSize: 18}}>Thông báo</Text>
                </View>
            </View>
</Modal>

so I add 2 props: onSwipe={() => this.setState({ isVisible: false })} swipeDirection="up"

this is working but I must be tap on the Modal.

Issue Image

react-native 0.53.0 react-native-modal 5.0.0

please help me

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

102reactions
faizalshapcommented, Mar 6, 2018

Hey Guys, I solved the issue by changing the visible prop to isVisible. @kodie the prop for visibility is isVisible 😃

12reactions
toussacommented, Jan 29, 2018

Try removing backgroundColor:'white' And set transparent={true} backdropColor="rgba(0,0,0,0.5)" in modal props

Read more comments on GitHub >

github_iconTop Results From Across the Web

backdropOpacity and backdropColor not working #110 - GitHub
But today, i create new app and backdropOpacity and backdropColor not working. Issue Image. Here is my code: <Modal onBackdropPress = {()=>this.
Read more >
How do I dim background when Modal is displayed in react ...
As mentioned in the docs , you need to use isVisible to show the modal and not visible . Therefore for the backdropColor...
Read more >
Popover/ion-backdrop change background opacity/color
Hello, currently Im solving the same problem. ... Issue: No option to change ion-backdrop opacity, hardcoded values within animation ...
Read more >
ptcs-value-display - ThingWorx Web Component SDK
The modal backdrop color (default: #232b2d). This is for the image pop-up. backdropOpacity, Number, The modal backdrop opacity, a value between 0-1.0 (default: ......
Read more >
How to Customise Ionic 6 Modal and Popover - YouTube
In Ionic 6 the styling of modals and popovers has changed, because they are now using Shadow DOM. Follow this quick win to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found