Closed 3rdp closed 5 years ago
I ran into this issue as well recently, for a quick fix you can pass in showInModal={false}
. This won't make a difference as long as you keep the popover as a child of a top-level view, but will have issues if the popover is nested down a few levels inside views with padding and margin.
I agree this is an issue and I may be able to fix this by tying into the Modal onDismiss
prop (https://facebook.github.io/react-native/docs/modal#ondismiss), I'm working on some updates in this area now so keep an eye out for a fix in the next release.
onDismiss works nice, why not just pass a callback for it and this should wrap this up
already done, just need to do some testing and documentation
Ok, just released version 2.0.0, the prop is now onCloseComplete
and by default it is mapped to onDismiss
. I tested and it can consistently open an Alert
with no need to timeout. Check it out when you get the change and let me know how it works for you! I've made a number of other changes, so check out the upgrading section of the readme to see other breaking changes.
@SteffeyDev awesome. Did you know that onDismiss prop in Modal is iOS-only though?
I was not aware, let me add a platform check in there...
Ok fixed (hopefully). v. 2.0.1
Describe the bug In
popoverDoneClosing
I want to open the Alert dialog. On iOS, the alert closes straight after it showed and after that the app freezes. You can't tap anything, my guess is that popover modal doesn't close properly and overlays the entire screen (like in #16). If you wrap Alert in setTimeout with 0 (zero) interval you may get this behavior after the second hit. You can try it out in this Expo Snack: https://snack.expo.io/HJFjG-G9V With 100 interval, it's pretty much ok, but it still freezes occasionally. Expected bevavior: I call Alert in popoverDoneClosing and it displays without closing and freezing the app, without the need to set a timeout.Device/Setup Info:
react-native
version: 0.58.5react-native-popover-view
version: 1.0.19Debug Output This bug does not reproduce when Remote Debug is enabled.