I'm not really sure what's going on with this. I am trying to open a context menu on a button click on the web. It flashes on screen for half a second and then it hides. I am trying to accomplish basically exactly what ChatGPT does when you click on the action menu icon on the chat list.
We have a tamagui app with a monorepo structure. Here is some example code:
<ContextMenu.Root>
<ContextMenu.Trigger asChild action={isWeb ? "press" : "longPress"}>
{trigger}
</ContextMenu.Trigger>
{/* @ts-expect-error for some reason TS thinks the next line is invalid */}
<ContextMenu.Content>
<ContextMenu.Item key="delete" destructive onSelect={() => onThreadDelete?.()}>
<ContextMenu.ItemIcon ios={{ name: "trash" }} androidIconName="ic_delete">
<Trash2 color="$textLink" size="$1" />
</ContextMenu.ItemIcon>
<ContextMenu.ItemTitle>Delete</ContextMenu.ItemTitle>
</ContextMenu.Item>
</ContextMenu.Content>
</ContextMenu.Root>
I'm not really sure what's going on with this. I am trying to open a context menu on a button click on the web. It flashes on screen for half a second and then it hides. I am trying to accomplish basically exactly what ChatGPT does when you click on the action menu icon on the chat list.
We have a tamagui app with a monorepo structure. Here is some example code:
The trigger is: