react-native-ios-context-menu icon indicating copy to clipboard operation
react-native-ios-context-menu copied to clipboard

Unable to open the menu when clicking on the ContextMenuBotton on android

Open bitdelve opened this issue 9 months ago • 0 comments

Everything works as expected on iOS, but when I click on the button on Android nothing happens. I don't see anything in the docs to explain this. Any guidance? Here is my code.

<ContextMenuButton style={styles.container2} menuConfig={{ menuTitle: '', menuItems: [{ actionKey: 'Home', actionTitle: 'Home', }, { actionKey: 'MyAccount', actionTitle: 'Account Settings', }, { actionKey: 'HealthDataSource', actionTitle: 'Health Data Source', }, { actionKey: 'LearnMore', actionTitle: 'Learn More', }, { actionKey: 'LegalPrivacy', actionTitle: 'Legal & Privacy', }, { actionKey: 'ScannerCode', actionTitle: 'QR Code Scanner', }, { actionKey: 'ReportProblem', actionTitle: 'Support', }, { actionKey: 'AccountDeletion', actionTitle: 'Request Account Deletion', }, { actionKey: 'Logout', actionTitle: 'Log Out', }, { actionKey: 'V', actionTitle:V${appconfig.appInfo.AppVersion} (${appconfig.appInfo.Server}), menuAttributes: ['disabled'] } ] }} onPressMenuItem={({nativeEvent}) => { if (nativeEvent.actionKey === 'Home') { handleHome(navigation); } else if (nativeEvent.actionKey === 'Logout') { handleLogout(navigation); } else { navigation.navigate(nativeEvent.actionKey); } // Alert.alert( // 'onPressMenuItem Event', // actionKey: ${nativeEvent.actionKey} - actionTitle: ${nativeEvent.actionTitle}// ); }} > <View style={{height:35}}> <Icon size={34} color='#0B254B' name='menu'></Icon> </View> </ContextMenuButton>

bitdelve avatar Jan 13 '25 21:01 bitdelve