-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat(dropdown): Make Auto-Close Dropdowns optional. Fix #2218 #3045
Conversation
+1 |
@chrisirhc I noticed you mentioned in #2218 about being willing to review a PR if someone implements the feature. This PR looks pretty good to me, but I'd like a second pair of eyes since I'm too tired at the moment. That this is an optional feature makes this ok IMO. |
@@ -2,3 +2,7 @@ | |||
Dropdown is a simple directive which will toggle a dropdown menu on click or programmatically. | |||
You can either use `is-open` to toggle or add inside a `<a dropdown-toggle>` element to toggle it when is clicked. | |||
There is also the `on-toggle(open)` optional expression fired when dropdown changes state. | |||
By default the dropdown will automatically close if any of its elements it's clicked, you can change this behaviour by setting the `auto-close` option as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if any of its elements it's clicked -> if any of its elements is clicked
Great work. I did a review. This looks good. Just a few suggestions. |
I'll make the edits as soon as I have 5 minutes. Thanks for reviewing! |
@chrisirhc Merged with upstream and addressed all the comments. |
Can you clean up the history? The merge commit should not be there. |
Done (and merged with latest commits) |
Thanks for the work here, this will make it in 0.13.0! |
Introduces an
auto-close
option which - when specified - works as follows:outsideClick
- closes the dropdown automatically only when the user clicks any element outside the dropdown.disabled
- disables the auto close. You can then control the open/close status of the dropdown manually, by usingis-open
.