You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the snackbars won't show on android in modals if one uses react-native-navigation. Imho, this is due to the fact, that react-native modals are rendered in the view hiearchy of the current activity, but react-native-navigation modals aren't (as they are internally Dialogs). Therefore, they are not found by the current implementation of recursiveLoopChildren.
I fixed it on my fork at https://github.com/johakr/react-native-snackbar. However, this enforces react-native-navigation as a dependency and is therefore not compatible with projects not using react-native-navigation.
To be honest, I currently have no idea and no time to figure out how to make this work for both kind of projects (those using react-native-navigation and those using standard react-native modals). Maybe someone wants to take a look at it and bring it into a mergable state.
For those using react-native-navigation and struggling with getting snackbars working in modals, feel free to use my fork as an interim solution.
The text was updated successfully, but these errors were encountered:
How can I use this commit in my project? Modifications in node_modules are lost easily. Could you drop it in npm to be installed please, because I'm having the same problem and need this fix. Thanks for this great lib!
@coderproject You can install the fork directly from github, no need for npm. Just update your package.json to "react-native-snackbar": "johakr/react-native-snackbar"
Hi,
first of all, thanks for this awesome library.
I noticed that the snackbars won't show on android in modals if one uses react-native-navigation. Imho, this is due to the fact, that react-native modals are rendered in the view hiearchy of the current activity, but react-native-navigation modals aren't (as they are internally
Dialogs
). Therefore, they are not found by the current implementation ofrecursiveLoopChildren
.I fixed it on my fork at https://github.com/johakr/react-native-snackbar. However, this enforces react-native-navigation as a dependency and is therefore not compatible with projects not using react-native-navigation.
To be honest, I currently have no idea and no time to figure out how to make this work for both kind of projects (those using react-native-navigation and those using standard react-native modals). Maybe someone wants to take a look at it and bring it into a mergable state.
For those using react-native-navigation and struggling with getting snackbars working in modals, feel free to use my fork as an interim solution.
The text was updated successfully, but these errors were encountered: