http://plnkr.co/edit/rO1cev9Pw7TNbeGLioVk?p=preview
How should I prevent the dropdown from closing If I want to have multiple checkboxes and check or uncheck more than one at a time?
http://plnkr.co/edit/rO1cev9Pw7TNbeGLioVk?p=preview
How should I prevent the dropdown from closing If I want to have multiple checkboxes and check or uncheck more than one at a time?
Since the dropdownToggle
observes click events to close the dropdown menu, you will need to stop propagation of click events on checkbox elements. This can be easily done like so:
<input type="checkbox" ng-click="$event.stopPropagation()">
And the working plunk: http://plnkr.co/edit/AcbhOkKr2rGrPeoge26H?p=preview
I had a similiar issue with bootstraps dropdown
and I wanted a native ( angular only ) implementation of a multi- dropdown select ( Basically I wanted to replace chosen since it depends on jquery ) . So I wrote one myself .
Here is the plunker demonstrating the dropdown :
http://plnkr.co/edit/lxewJUN8li9YQj9h1cIz?p=preview
It has support for Select All
as well if you are in need of something like that.
Hope this helps.
NOTE : For some reason it only works with the unstable branch.