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

propagate click event to popover item activation callback #2703

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

mauritskorse
Copy link

For creating modals that can attach to the popover menu, it is useful to have the event data being propagated to the onActivate() callback. The interface already had the event implemented:

onActivate: (item: PopoverItemParams, event?: PointerEvent) => void;

But the methods in after the event listener did not pass the event data on yet.

@TatianaFomina
Copy link
Contributor

Hi! Can you please provide the use case for which you need to have an event data in onActivate handler?

@TatianaFomina
Copy link
Contributor

Also, please add a test and update changelog

@mauritskorse
Copy link
Author

Hi! Can you please provide the use case for which you need to have an event data in onActivate handler?

Use case is to get the xy position of the menu item such that I can position a modal next to the popover menu item when clicked.
Another option would be to be able to add custom html in the submenu that is now available in the rc for v2.30.

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

Successfully merging this pull request may close these issues.

2 participants