-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow _click of MenuItem in a MenuBar #33
Comments
Yeah, that sounds pretty reasonable, thanks! It seems that the ContextMenu is there just to verify that the menu item is actually visible and enabled. Unfortunately that's not possible with MenuBar since it's not possible to retrieve the MenuBar instance from MenuItem. Opened a feature request here: https://github.com/vaadin/vaadin-menu-bar-flow/issues/83 As a workaround you can use |
Alternatively I can implement |
That way one would need to lookup both components. I worked around with a helper
That helper does not check anything, so probably using clickItemWithCaption would be better. |
That would help in some places! |
Awesome workaround :-D Yet I'm hesitant to include this into Karibu-Testing since it's exactly as you said - no checks are done. Actually
Thanks! This has been implemented in the commit #53fb104 and will be released with the next release of Karibu-Testing 👍 Now that the workarounds are in place, let's wait for Vaadin folk to fix https://github.com/vaadin/vaadin-menu-bar-flow/issues/83 so that I can implement the |
Currently MenuItem._click() seems to be tied to a contextMenu.
If the parent is a menubar I guess it could fire a simple click event. (?)
Unfortunately MenuBarRootItem has package scope, so we can't search for that easily.
The text was updated successfully, but these errors were encountered: