instea / react-native-popup-menu

Popup menu component for React Native
ISC License
1.48k stars 248 forks source link

Menu not working on IOS with RN-navigation, fine on Android #160

Open ElixirMike opened 5 years ago

ElixirMike commented 5 years ago

I have the menu working fine in my Android environment...the top level component is wrapping with

I am now trying it in IOS, and when I click, nothing happens...the menu doesn't pop-up. In addition, it seems to freeze all the other actions in the component, other actions become unresponsive and I have to restart the application to get it back to working order.

Any ideas or changes I need to make in IOS to get this working?? This is running on a Iphone simulator with version 12.2 of the IOS software.

sodik82 commented 5 years ago

can you provide us sample project eg. as expo snack? You can use https://snack.expo.io/@sodik82/react-native-popup-menu as a base if you want.

ElixirMike commented 5 years ago

Here is the snack: https://snack.expo.io/rJboKv3C4

I added the two main files.

  1. sidedrawer.js : the main component which has the wrapper around the sub components and the

  2. UserPanel.js file is where I render the menu.

Please note this works fine in my Android environment but does not work in my IOS environment. I tried to play around/simplify the menu structure as much as possible...but it's just not working. When I click on it, it does not pop-up, no error is shown in console....so not sure how to proceed.

Let me know if this is enough to reproduce/troubleshoot.

Thanks, Mike

On Mon, Jun 10, 2019 at 5:02 PM Stanislav Miklik notifications@github.com wrote:

can you provide us sample project eg. as expo snack? You can use https://snack.expo.io/@sodik82/react-native-popup-menu as a base if you want.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/instea/react-native-popup-menu/issues/160?email_source=notifications&email_token=AIEE4NXEXGVRNMIDJYH34ETPZ26M7A5CNFSM4HWUGHSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXLHF5Q#issuecomment-500593398, or mute the thread https://github.com/notifications/unsubscribe-auth/AIEE4NRHYCXHV2RVGS2CO3TPZ26M7ANCNFSM4HWUGHSA .

sodik82 commented 5 years ago

the point of snacks is that you can actually run examples on your devices - which I can't in your case. But at least I see some code.

It looks that sidedrawer is not your root component, doesn't it? Because MenuProvider should be always at the very root of your application.

ElixirMike commented 5 years ago

It wouldn't be easy to replicate a working example here..I'm using react-native-navigation which changes how you wrap the application. Upon logging in, the Navigation is used to direct to 2 separate components...the "main" component and a sidedawer component, which is where I have wrapping.

Again, this works on android...so it appears I have the code setup properly? Could it be something with my IOS environment? Anything I can check?

sodik82 commented 5 years ago

not necessarily. the IOS and Android handles differently z-Index and it can be the issue. hard to tell.

jhondavila commented 5 years ago

some solution, I present the same problem in ios platform

sodik82 commented 5 years ago

is it problem only inside RNN side drawer or is it problem also on other screens?

jhondavila commented 5 years ago

it seems that only happens with RNN

Bayramito commented 4 years ago

+1 i got the same error today, still not working on ios...

shiroze commented 4 years ago

This plugin still not working on iOS, did someone find the solution already ?

muhammadali543 commented 3 days ago

You can solve this issue by providing to each screen where

is using. It's not working on IOS when place in _layout file.