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

Close menu on mouseout #140

Open
StevenToth opened this issue Oct 2, 2018 · 1 comment
Open

Close menu on mouseout #140

StevenToth opened this issue Oct 2, 2018 · 1 comment

Comments

@StevenToth
Copy link

I've gone through the demo and doc on the project landing page several times, and looked at the component source, but haven't been able to determine how to have the menu close on a mouseout (i.e. when focus leaves the menu container). The only ways I can find for the menu to close is via menu item selection or if there is a click somewhere outside the menu. At this point I'm assuming it's not possible, so I am submitting a feature request. Apologies if I'm missing something. Thanks.

@isaacplmann
Copy link
Owner

You're right, I'd need to refactor the code a bit to give you control over that.

The way I'd like allow for this feature is to use a single <ng-template> for the whole context menu contents instead of having the user provide a different <ng-template> for each context menu item. That way you could simple put a (mouseout) listener on that item. It would also remove the need for a lot of the config options that are there now.

divider, passive, enabled and visible would no longer be necessary. menuClass and useBootstrap4 would be unnecessary as well.

Making sub menus work correctly might be a little tricky, but definitely possible.

I think I would keep all those config options in place as deprecated and the default template would make them function the way they do now, but any template override could ignore them. I don't want to make an actual breaking change until I've figured out how to use schematics to automatically upgrade people.

Sorry for the long reply. Just trying to share what I'm thinking. I don't have a timeline on any of this.

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

No branches or pull requests

2 participants