ui-select does not allow duplicated values to be insert in a select list item. I have one use case where a user can enter a value multiple times. The value entered by the user will not be selected from the drop list.
Is it possible to achieve this with a ui-select directive?
<ui-select multiple tagging tagging-label="(custom 'new' label)" ng-model="ctrl.multipleDemo.colors" theme="bootstrap" sortable="true" ng-disabled="ctrl.disabled" style="width: 300px;" title="Choose a color">
<ui-select-match placeholder="Select colors...">{{$item}}</ui-select-match>
<ui-select-choices repeat="color in ctrl.availableColors | filter:$select.search track by $index">
{{color}}
</ui-select-choices>
</ui-select>
Here is the sample plunk http://plnkr.co/edit/s407ooeoeFh2dH9DynZy?p=preview
The user may enter manual values like 'a' in this ui select. After entering 'a' once, a user may not enter 'a' again, as ng-repeat do not allowed duplicate value. I tried to use track by $index so that it can take the array position but I am not able to enter same value twice.