Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
fix(uiSelectMultiple): Allow duplicates in $select.selected
Browse files Browse the repository at this point in the history
add track by $index to $select.selected ng-repeat

Closes #1688
  • Loading branch information
sh977218 authored and user378230 committed Jun 26, 2016
1 parent d6e0d30 commit 9f5d6ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/match-multiple.tpl.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<span class="ui-select-match">
<span ng-repeat="$item in $select.selected">
<span
<span ng-repeat="$item in $select.selected track by $index">
<span
class="ui-select-match-item btn btn-default btn-xs"
tabindex="-1"
type="button"
Expand Down
2 changes: 1 addition & 1 deletion src/select2/match-multiple.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
do not work: [class^="select2-choice"]
-->
<span class="ui-select-match">
<li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected"
<li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected track by $index"
ng-class="{'select2-search-choice-focus':$selectMultiple.activeMatchIndex === $index, 'select2-locked':$select.isLocked(this, $index)}"
ui-select-sort="$select.selected">
<span uis-transclude-append></span>
Expand Down

0 comments on commit 9f5d6ec

Please sign in to comment.