Disable native context menu in react native gifted chat

35 views Asked by At

In my react-native-gifted-chat application I want to use my custom context menu when long pressing message bubble. So I use react-native-context-menu-view like below.

const ChatContextMenu = ({bubbleProps}: Props) => {
    
    return (
        <ContextMenu
            actions={[{title: 'Delete'}]}
            onPress={(event) => {
                if (event.nativeEvent.name === 'Delete') {
                    console.log('deleting...')
                }
            }}
        >
            <Bubble
                {...bubbleProps}
            />
        </ContextMenu>
    )
}

And it works but when I long press the bubble, also the native context menu appears like in the photo below

enter image description here

How can I disable this?

1

There are 1 answers

1
Brogrammer On BEST ANSWER
<GiftedChat
  onLongPress={()=> {}}