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
681 stars 248 forks source link

Is it possible to select multiple of the same option? #261

Closed Marlonzao closed 5 years ago

Marlonzao commented 5 years ago

Please make sure you can mark all the options, before open this Issue. I'll prioritise the issues that are consistent and completed.

Please, post your plunker link here:

Adapted Jquery Chosen to allow multiple of the same option: https://plnkr.co/edit/0qCysg4diFnmpm70OSh1?p=preview

Write your issue:

Hi, I'm in need of a feature that allows the multiple selection of the same option, I've been able to implement it in the chosen jquery plugin using the help of this stackoverflow answer https://stackoverflow.com/a/38287099, but I wasn't able to implement it in the angular-chosen. I've provided a plunkr with a working version of the jquery chosen that allows multiple selection of the same option. I think if i'm able to pass the "allow_duplicates: true" on the directive into the jquery plugin, it will enable the multiple selection, but I'm not sure on how to do it or if it will work.

Thanks for any help.

Marlonzao commented 5 years ago

Hi, I've been able to make my adapted version of the jquery chosen plugin to work with angular-chosen by adding chosen="{allow_duplicates: true}" on my select.

Here is the plunkr link if anyone is interested on a select that allows the multiple selections of the same option https://plnkr.co/edit/ju0OZyYfeQmSPAwHIyeB?p=preview