leocaseiro / angular-chosen

AngularJS Chosen directive is an AngularJS Directive that brings the Chosen jQuery in a AngularJS way
http://leocaseiro.github.io/angular-chosen/
MIT License
682 stars 248 forks source link

Clear the multiple selection #246

Closed ChangYinShung closed 7 years ago

ChangYinShung commented 7 years ago

Excuse me,how can clear all selection while in mutiple mode. I create an button order to clear all selection. here is my codpen: https://plnkr.co/edit/ndqd1RW0O9thxEVsG7uq?p=preview

i found the same issuse in chosen's github :https://github.com/harvesthq/chosen/issues/2779. look like i need to "trigger("chosen:updated")" and how can i trigger this event in angular?

leocaseiro commented 7 years ago

Hi @ChangYinShung, You are in the right track;

It was missing the ng-click method: ng-click="ClearOption()">

https://plnkr.co/edit/sLYK5hhc9F6yBaglyPa1?p=preview