Disable selected options in angular -ui-select multiselect mode

In ui-select muliple mode, the selected options are removed (also marked in the source code) from the selection list, but I just need the selected options to be disabled, as shown below, instead of deleting.

enter image description here

This image above is taken from selectedjs .

There is a ui-disable-choice option to disable the selection, but it just makes the selection completely unselected.

 <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 options displayed in the options but disabled?

plnkr here.

+7
angularjs select multiple-select ui-select angular-ui-select
source share
1 answer
+1
source share

All Articles