This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 366
366
e . stopPropagation ( ) ;
367
367
} ;
368
368
369
+ ctrl . isLocked = function ( index ) {
370
+ return ctrl . selected [ index ] && ctrl . selected [ index ] . locked ;
371
+ } ;
372
+
369
373
// Remove item from multiple select
370
374
ctrl . removeChoice = function ( index ) {
371
375
var removedChoice = ctrl . selected [ index ] ;
Original file line number Diff line number Diff line change 5
5
-->
6
6
< span class ="ui-select-match ">
7
7
< li class ="ui-select-match-item select2-search-choice " ng-repeat ="$item in $select.selected "
8
- ng-class ="{'select2-search-choice-focus':$select.activeMatchIndex === $index} ">
8
+ ng-class ="{'select2-search-choice-focus':$select.activeMatchIndex === $index, 'select2-locked':$select.isLocked($index) } ">
9
9
< span uis-transclude-append > </ span >
10
- < a href ="javascript:; " class ="ui-select-match-close select2-search-choice-close " ng-click ="$select.removeChoice($index) " tabindex ="-1 "> </ a >
10
+ < a href ="javascript:; " ng-if =" !$select.isLocked($index) " class ="ui-select-match-close select2-search-choice-close " ng-click ="$select.removeChoice($index) " tabindex ="-1 "> </ a >
11
11
</ li >
12
12
</ span >
You can’t perform that action at this time.
0 commit comments