instea/react-native-popup-menu

RN 0.63.2: Doesn't work on Android. [works well on iOS]

gagandeep-s opened this issue · 5 comments

Pop menu doesn't appear on tap on Android.

Works well on iOS.

RN 0.63.2

For me not working on iOS work fine on Android

"react": "16.13.1",
"react-native": "0.63.2",
"react-native-popup-menu": "^0.15.9",

Pop menu doesn't appear on tap on Android.

Works well on iOS.

RN 0.63.2

me too. how can you fix it ???

For me not working on iOS work fine on Android

"react": "16.13.1",
"react-native": "0.63.2",
"react-native-popup-menu": "^0.15.9",

For me now work fine on Android & iOS, please remember the zIndex between component and View, try remove Flex from Component react-native-popup-menu

    <Menu styles={{flex: 1}}> //Don't use flex, remove it
      <MenuTrigger text='Select action' styles={{flex: 1}} /> //Don't use flex here either, remove it
      <MenuOptions>
        <MenuOption onSelect={() => alert(`Save`)} text='Save' />
        <MenuOption onSelect={() => alert(`Delete`)} >
          <Text style={{color: 'red'}}>Delete</Text>
        </MenuOption>
        <MenuOption onSelect={() => alert(`Not called`)} disabled={true} text='Disabled' />
      </MenuOptions>
    </Menu>

hope this help

thanks @shiroze

@phongit1995 - as we can see also in this thread (for someone it works there for someone exact opposite combination), the problems must be somehow connected to specifics of your setup. in general, I believe, it works pretty well.

but we encourage community to find out the edge use-cases where it breaks, so if you find out more what is wrong, pls let us know.

I got the same problem using styles={{flex: 1}} but I don't understand why this is happening