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

Want events when overlay-trigger, sp-dropdown or sp-action-menu opene/close #1055

Closed
cuberoot opened this issue Dec 15, 2020 · 4 comments
Closed

Comments

@cuberoot
Copy link
Collaborator

Expected Behaviour

This is a feature request. I'd love to get an event when menus and overlay triggers open and close. I have hit two scenarios where this would have been handy in the last week.

@cuberoot
Copy link
Collaborator Author

If this seems reasonable, I'm happy to do the work.

@Westbrook
Copy link
Contributor

Totally agree. Would love to see a rough outline of your specific use cases here in the issue for reference, too.

Should this event take into account anything else about the overlay? Type, etc. My use case had always been generically "when did this close" so maybe that's the long and short of it, but having your cases might support the desire for slightly more as far as the API goes here.

Please note that "close" is currently dispatched here: https://github.com/adobe/spectrum-web-components/blob/main/packages/overlay/src/ActiveOverlay.ts#L328 and that the next branch is pretty far ahead of the main branch (due to some release blocking that hopefully #1051 will release) so it's possible that this change should be branched from there.

@cuberoot
Copy link
Collaborator Author

My two use cases are:

  • I have a popover within an overlay trigger. The trigger element needs to be styled differently when the popover is open. In this case, I am using a popover to simulate an action menu to work around the issue of needing two separate lists of options in one menu
  • In the second case, I have an action menu containing some non-standard controls that need to update using network requests when the menu opens

@Westbrook
Copy link
Contributor

Released

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