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

Dropdown: Use other event than the click event #1115

Closed
dotcs opened this issue Dec 5, 2016 · 1 comment
Closed

Dropdown: Use other event than the click event #1115

dotcs opened this issue Dec 5, 2016 · 1 comment

Comments

@dotcs
Copy link

dotcs commented Dec 5, 2016

Bug description:

Component: dropdown

It should be possible to specify the event that is used to toggle the menu. Currently it's hard coded to use the click event. I think it should be possible to use the same directives for context menus which would require to listen to the the contextmenu event instead of the click event.

Unfortunately I'm not sure how to do this best, because it's not decided within the component but the host. If we can discuss what would be the best way to do it, I could create a PR.

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 2.1.2
ng-bootstrap: 1.0.0-alpha.14
Bootstrap: 4.0.0-alpha.4

@wesleycho
Copy link
Member

It is possible to manually bind event listeners using Renderer - one could get the element through usage of ElementRef. Be warned though, manually managing this logic is quite a bit of work.

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

3 participants