Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

There should be a way to detect when the class open was added/removed from a drop down-toggle #1447

Closed
lgalfaso opened this issue Dec 22, 2013 · 4 comments

Comments

@lgalfaso
Copy link
Contributor

There should be a way to detect when the class open was added/removed from a dropdown-toggle. Right now, this is not possible as this does not trigger an even nor adding/removing the class is done inside a scope::$apply.
The later option, if decided that it would be the best way to move forward, needs to be done with some care as the closeMenu is sometimes called inside an $apply and sometimes not (it is called inside an $apply when changing $location)

@pkozlowski-opensource
Copy link
Member

@lgalfaso sorry, what is the motivation for your request?

@lgalfaso
Copy link
Contributor Author

@pkozlowski-opensource Sometimes is needed to perform some action when the dropdown is opened/closed. In our case, we have a dropdown that has an field and we would like to focus on this element when the user clicks on it

@pkozlowski-opensource
Copy link
Member

In this case the best approach would be to extract directive's logic into its controller so other directives can plug into this logic. Would you by up to preparing a pull request?

lgalfaso added a commit to lgalfaso/bootstrap-ui that referenced this issue Dec 23, 2013
Add the parameters `open` and `close` that are called when the dropdown
is opened and closed

Closes angular-ui#1447
@lgalfaso
Copy link
Contributor Author

@pkozlowski-opensource To make this consistent with the tabs component, created a patch that adds the open and close parameters that are called when the dropdown is opened/closed

bekos added a commit to bekos/bootstrap that referenced this issue Jan 19, 2014
bekos added a commit to bekos/bootstrap that referenced this issue Jan 20, 2014
@bekos bekos closed this as completed in ae31079 Jan 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants