mxck / react-native-material-menu

Pure JavaScript material menu component for React Native
MIT License
512 stars 91 forks source link

fixing modal not hiding because of the animation #107

Open nicolaslazzos opened 3 years ago

nicolaslazzos commented 3 years ago

On the hide() method, when the menuState is being setted as HIDDEN, this was triggering the _onMenuLayout() method, so the menuState was immediately being setted to ANIMATING, which was causing the modalVisible variable to be true. So, though this was an unwanted behavior, in mobile it wasn't showing, but in web, because of the modal wasn't closing, it stayed and forced you to click on the screen again so that it closed after the menu disappeared.

I simply added that when the menuState is HIDDEN, the _onMenuLayout() method ignores that trigger.

gpsolarco commented 2 years ago

Is there any workaround for this issue for v1.2.0 + Expo SDK42? I am facing issues getting v2.0.0 to start with Expo SDK 42 to will need to stick to v1.2.0 till the other issue gets resolved.

mxck commented 2 years ago

@gpsolarco you got this issue on mobile?

gpsolarco commented 2 years ago

Both Mobile and Web. My current RN code base is still class based but that should not be an issue I think.

gpsolarco commented 2 years ago

Any update on this issue? thanks!