You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently updated react-native-ios-context-menu and noticed the behavior is not the same as before.
I have a list of cards and when you click it it navigate to the associated profile page.
Before that, the longpress was correctly handled, but now if I release my finger as soon as I feel the vibration of the longPress, the shortPress fires too.
But if I press long enough, the shortPress is not fired and everything works fine.
import{ListItem}from"react-native-elements";import{ContextMenuView}from"react-native-ios-context-menu";import{useNavigation}from"@react-navigation/native";constCard=()=>{constnavigation=useNavigation();return(<ContextMenuViewmenuConfig={{menuTitle: "",menuItems: [{actionKey: "key-00",actionTitle: "Edit",},{actionKey: "key-01",actionTitle: "Delete",menuAttributes: ["destructive"],},],}}onPressMenuItem={({ nativeEvent })=>{switch(nativeEvent.actionKey){case"key-00":
navigation.navigate("EditPartner",{partnerId: partner._id});break;case"key-01":
Alert.alert("Are you sure you want to remove this partner?","This action is irreversible and cannot be undone.",[{text: "Cancel",style: "cancel",},{text: "Delete",onPress: ()=>deletePartner(partner._id),style: "destructive",},]);break;}}}><ListItemonPress={()=>navigation.navigate("Partner",{partnerId: partner._id,})}><ListItem.Content><ListItem.Title><Text>Title</Text></ListItem.Title></ListItem.Content></ListItem></ContextMenuView>);};
I can't find anywhere in the doc a navigation inside the ContextMenuView.
The text was updated successfully, but these errors were encountered:
I recently updated
react-native-ios-context-menu
and noticed the behavior is not the same as before.I have a list of cards and when you click it it navigate to the associated profile page.
Before that, the longpress was correctly handled, but now if I release my finger as soon as I feel the vibration of the longPress, the shortPress fires too.
But if I press long enough, the shortPress is not fired and everything works fine.
Expected behavior
RPReplay_Final1725883798.MP4
Not too long press behavior
RPReplay_Final1725883785.MP4
It was working very well on
1.X
My
package.json
:The code I use for this :
I can't find anywhere in the doc a navigation inside the
ContextMenuView
.The text was updated successfully, but these errors were encountered: