palantir/blueprint
在 GitHub 查看Can we have a ContextMenu2 with an arrow like we have in Popover2? Arrow modifier doesn't work for me.
Open
#4,865 建立於 2021年8月20日
P2Package: popover2Type: feature requesthelp wanted
描述
Environment
- Package version(s): "@blueprintjs/core": "^3.10.0", "@blueprintjs/popover2": "^0.11.1",
- Browser and OS versions: MacOS Catalina Version 10.15.7 Browser Firefox 91.0.1
Question
I would need a context menu but with an arrow just like a popover (screenshot below), which points to the clicked screen coordinates on the clicked component.
I saw two solutions:-
- Opening Popover2 on right-click
- Adding
arrow: { enabled: true }modifier as a prop in ContextMenu2
But AFAIK, opening Popover2 with right-click isn't possible according to the official documentation, right?
And, providing this modifier didn't work.
<ContextMenu2
modifiers={{ arrow: {enabled: true} }}
content={<p>hello world</p>}
>
Click me to open menu
</ContextMenu2>

Can someone please share a snippet in JS? Thanks a lot.