Message shows underneath modal
See original GitHub issueI would like to start off by saying that this library is amazing.
I’m having one particular issue that the message shows underneath a modal if a modal is currently open
My current root setup looks like:
<Provider store={store}>
<ActionSheetProvider>
<App />
</ActionSheetProvider>
</Provider>
Where App is :
<View style={{flex: 1}}>
<AppNavigation
ref={this.onNavigatorRef.bind(this)}
/>
<FlashMessage position="top" />
</View>
Any help would be appreciated, thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Bootstrap modal appearing under background - Stack Overflow
I don't understand this answer. The Bootstrap examples show a modal div with a number of classes along the line of "modal","modal-fade", etc....
Read more >Showing messages in a modal - FormValidation
In this example, I will show you a way of placing the messages in a Bootstrap modal. All messages are then shown up...
Read more >Bootstrap Modal Dialog showing under Modal Background
The easiest solution is to move the modal dialog outside of any container and just declare it under the <body> element, or -...
Read more >Info and Error messages are displayed under Modal Windows
Symptoms Info and error messages are displayed under Modal Windows instead of being on the Window Modal. See images below: Release Any current...
Read more >Modal - Bootstrap
Modals are built with HTML, CSS, and JavaScript. They're positioned over everything else in the document and remove scroll from the <body> so...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @ucallQA and @lisa-nguyen-goldenowl
As we could see in https://github.com/react-native-community/react-native-modal README:
“Since react-native-modal is an extension of the original react native modal, it works in a similar fashion react-native original modal.”
The original react native modal it’s a “100% native solution” it works in another UI thread inside the app like a portal, só it runs always above everything in your app.
The only solution we had in this case it’s described here: https://github.com/lucasferreira/react-native-flash-message/issues/1#issuecomment-375636151
Basically you will need to put a second instance of
<FlashMessage />
component inside your modals and call the show message by the ref, ex:this.refs.mySecondFlashMessage.showMessage({ ... })
I actually double checked if we were using a built in modal and we are using this library
https://github.com/react-native-community/react-native-modal
I think there might be a priority issue with this library, is there some way I can prioritize the react-native-flash-message over this one? I use the modal nested deep within one of my react components while the react-native-flash-message is initialized and called within the root/first layer of the project so I would imagine it would take priority.
Unless I’m misunderstanding the issue and it’s related to react-navigation (we’re on a much older version of it, this might be why it’s acting weird)