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

Commit 906dfda

Browse files
committed
Using track by to avoid insertint a new item with the same person name
1 parent bcfd104 commit 906dfda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: examples/demo-tagging.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ <h3>Tagging without multiple, with simple strings</h3>
143143
<h3>Tagging without multiple with label and complex objects</h3>
144144
<ui-select tagging="convertToPerson" on-select="onSelect($item, $model)" ng-model="person.selected" ng-disabled="disabled" title="Choose a person" style="width: 800px;">
145145
<ui-select-match placeholder="Selecione um cliente">{{$select.selected.name}}</ui-select-match>
146-
<ui-select-choices repeat="person in people | propsFilter: {name: $select.search}" >
146+
<ui-select-choices repeat="person in people | propsFilter: {name: $select.search} track by person.name" >
147147
<div ng-if="person.isTag" ng-bind-html="person.name +' <small>(new)</small>'"></div>
148148
<div ng-if="!person.isTag" ng-bind-html="person.name | highlight: $select.search"></div>
149149
</ui-select-choices>

0 commit comments

Comments
 (0)