Comments (10)
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: #1 (comment)
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({ ... })
from react-native-flash-message.
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)
from react-native-flash-message.
I had this problem and found this solution in the official examples. maybe it helps too
from react-native-flash-message.
Hi @ucallQA
I've made a small sample at expo using react-navigation and Modals:
https://snack.expo.io/SJ7LNmIKB
As you can see when you click "Go to logout screen" a new screen are open in modal way, and the flash message keeps working.
If your setup it's different from my sample, please let me know and send me more code or prints.
from react-native-flash-message.
It worked like a charm!!! Thanks, @lucasferreira!
from react-native-flash-message.
@GustavoBonfimS https://github.dev/lucasferreira/react-native-flash-message/tree/master/examples/FlashMessagePlayground/components/CustomModal was useful for me... tnx
from react-native-flash-message.
Hi @ucallQA
What kind of navigation lib are you using?
from react-native-flash-message.
Hi @lucasferreira ,
Currently we are using react-navigation although it is not the latest version, maybe that's why?
from react-native-flash-message.
I have the same problem as @ucallQA
from react-native-flash-message.
You're welcome @lisa-nguyen-goldenowl ;)
from react-native-flash-message.
Related Issues (20)
- Does not render only on IOS HOT 3
- Not support iPhone 14 HOT 11
- Does not run on a CASIO Handheld running Android 8 HOT 4
- Show Toast Message always appears behind the modal in iOS when it is open using react-navigation 6.x HOT 13
- Flash message not shown on Android 9 (Sony Xperia Z1) HOT 5
- Invalid prop `icon` supplied to `FlashMessage`, expected one of type [string, object]. HOT 1
- Android cutoff HOT 5
- Warning: Failed prop type: The prop `message.message` is marked as required in `ForwardRef`, but its value is `undefined`.
- MessageOptions and MessageComponentProps interfaces are incorrect HOT 2
- How to test this component with RNTL? HOT 6
- Updating icon props to allow JSX.Element callback HOT 5
- custom icon not working
- Không thể xoá paddingTop HOT 1
- Try it out not working - Error on Snack
- FEATURE REQUEST: Persistent FlashMessage HOT 4
- Message disappers quickly in iOS
- onPress not triggered with TouchableWithoutFeedback - Pressable works
- Unable to show custom icon in the toast HOT 1
- closing a modal window by moving up
- Support for dynamic island on iOS? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-flash-message.