Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have a ContextMenu2 with an arrow like we have in Popover2? Arrow modifier doesn't work for me. #4865

Open
dhruv10 opened this issue Aug 20, 2021 · 2 comments

Comments

@dhruv10
Copy link

dhruv10 commented Aug 20, 2021

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:-

  1. Opening Popover2 on right-click
  2. 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>

image

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

@adidahiya
Copy link
Contributor

This is currently unsupported. But I would consider adding support for modifiers to ContextMenu2. The API would look like this:

<ContextMenu2 popoverProps={{ modifiers: { arrow: { enabled: true } }}}>

@dhruv10
Copy link
Author

dhruv10 commented Aug 26, 2021

Okay, thanks! Adding this would be appreciated. Just to clarify, I'm not in a hurry with this feature. So, please prioritize according to what you think is more important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants