In ui-select
muliple mode, selected choices are removed(checked in source code too) from the choices list but I just need that selected choices to be disabled, like below, instead of being removed.
this above image is taken from chosenjs.
There is an option, ui-disable-choice
, to disable the choices but it just make the choice entirely unselectable.
<ui-select-choices ui-disable-choice="person.name=='Adam'" repeat="person in people">
<div ng-bind-html="person.name"></div>
</ui-select-choices>
So, How to make the selected choices to appear in the choices but disabled?
plnkr example here.
The feature you are asking for is available in ui-select
v0.17.2 or later.
https://github.com/angular-ui/ui-select/wiki/ui-select#examples-disabling-instead-of-removing-selected-items-in-multiple-selection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With