Presenting modal with transparent background with custom using modalPresentationStyle is not working properly, it was working two weeks ago
this.props.navigation.showModal({
component: {
name: Screens.SortFiltersScreen,
passProps: {
source: "Home",
onResultRequest: this._presentBusinessesList
},
options: {
modalPresentationStyle:
"overFullScreen" // try any other style, all the same result
}
}
})
Yes, thanks for posting. Others are experiencing the same using:
layout: {
backgroundColor: 'transparent',
},
screenBackgroundColor: 'transparent',
modalPresentationStyle: 'overCurrentContext',
See: https://github.com/wix/react-native-navigation/issues/3413#issuecomment-429538465
Amazing
Not sure if this fix has been released, but I am still experiencing this bug on iOS v2.0.2623
@ywongweb Can you please PR a layout where this breaks to the playground app? Possible to ModalScreen.js
@guyca
My bad, I probably had the keys in the wrong place. It is working on iOS 2.0.2623
Working sample code:
Navigation.showModal({
component: {
name: 'modal121',
id: 'myModal',
options: {
layout: {
backgroundColor: 'rgba(0,0,0,0.9)',
},
modalPresentationStyle: 'overCurrentContext',
},
},
})
@ywongweb have you tried the following?
static options() {
return {
layout: {
backgroundColor: 'transparent',
},
screenBackgroundColor: 'transparent',
modalPresentationStyle: 'overCurrentContext',
};
}
Try adding screenBackgroundColor: 'transparent' and see if that helps.
I am on rnn 2.1.2 (if that is really the latest) and
layout: {
backgroundColor: 'transparent' or the appropriate color
}
does it for me. Thanks @pribeh
If I set
Navigation.showModal({
component: {
name: ComponentName,
id: ComponentID
passProps: { isModalScreen: true },
options: {
layout: { backgroundColor: 'transparent' },
screenBackgroundColor: 'transparent',
modalPresentationStyle: 'overCurrentContext',
}
}
});
this crash happens
@adybuciuman You can use overFullScreen
instead of overCurrentContext
.
@emilioheinz thanks for solving this, just a note that the docs on the website on Modals actually still say to use 'overCurrentContext' ->
https://wix.github.io/react-native-navigation/docs/modal
Probably why people (like me) are still running into this issue =D
@emilioheinz thanks for solving this, just a note that the docs on the website on Modals actually still say to use 'overCurrentContext' ->
https://wix.github.io/react-native-navigation/docs/modal
Probably why people (like me) are still running into this issue =D
Sorry but I'm not able to access the link provided in your comment.
Most helpful comment
Yes, thanks for posting. Others are experiencing the same using:
See: https://github.com/wix/react-native-navigation/issues/3413#issuecomment-429538465