mxck / react-native-material-menu

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

Can't open a modal right after closing the menu #115

Closed JohnWilliamForcier-Spiria closed 2 years ago

JohnWilliamForcier-Spiria commented 2 years ago

I know this was a problem in the last 1.X versions and there was a callback on the hide function. Do you have a workaround for this version?

Thanks!

BrodaNoel commented 2 years ago

Having the same issue. If the ModalItem opens a modal, it gets automatically closed. Or for example, if it runs Share.share (in order to share a link), it close it.

reececox commented 2 years ago

The easiest workaround I've found is to set animationDuration: 0. You can keep the open animation and disable the hide animation:

<Menu visible={visible} animationDuration={visible ? 300 : 0} />
JohnWilliamForcier-Spiria commented 2 years ago

Great I think for the moment it makes sense. Thanks it works!