react-native-popup-menu
react-native-popup-menu copied to clipboard
Popup menu staying in position where clicked even after trigger element is scrolled programmatically.
If you have question about the usage of the library, please ask question on StackOverflow with tag react-native-popup-menu. We are subscribed to it but it also allows community to help you if we are busy.
If you have found a bug, please describe your problem and expected behaviour. Additionally let us know library version, platform on which the problem happens and if possible some code snipets reproducing problem.
Hi, thanks for reporting. Could you show us some code reproducing your issue?
@ranvir-gorai I also ran into this issue pretty quickly on web. I created a simple demo demonstrating the problem.
The menu triggers and appears great. However, the popup-menu ignores the ScrollView
it is wrapped in. This is because the ScrollView
isn't actually having any affect in a simple use like in that demo, the page is scrolling naturally. I have gotten the popup-menu to stick to the right place by adding the maxHeight
property to the ScrollView
.
https://snack.expo.io/BkFp5-CYr
Now, the popup-menu's parent component is still running off screen as the maxHeight
is large for the snack web screen, but the menu is placed correctly regardless of the scroll position of the ScrollView
or page.
In my work, I set the ScrollView
's maxHeight
to the height of the page to mimic natural page scrolling.
I didn't mean to reopen the issue! Just trying to help those searching for answers like myself.
If it's already opened though.. I can't figure out how to get the same solution for horizontal scrolling. ScrollView
inside a <ScrollView horizontal={true}>
or vice-versa breaks styles or has no affect.