再次标记 ui-select (angular-ui)select

Tagging in ui-select (angular-ui) mulitselect

我浏览了很多,但找不到解决这个问题的有效方法。我有一个 ui-select multiselect UI-SELECT. By using 'tagging' and 'tagging-label' attributes we can add enter custom tags into the list. example is given in this plunker.

<ui-select multiple tagging tagging-label="(custom 'new' label)" ng-model="multipleDemo.colors" title="Choose a color">
    <ui-select-match placeholder="Select colors...">{{$item}}</ui-select-match>
    <ui-select-choices repeat="color in availableColors | filter:$select.search">
      {{color}}
    </ui-select-choices>
  </ui-select>

当我们输入时,如果 'custom-tag' 建议显示在列表的顶部。如何让它出现在列表底部?

示例:当键入 g 时,下拉列表中显示的选项是

[ g(custom 'new' label), Green, Magenta ]

但我希望顺序为

[ Green, Magenta, g(custom 'new' label) ]

根据文档,如果不修改 angular-ui 源代码,似乎没有任何方法可以做到这一点。一种可能的解决方法是设置 tagging-label="false",这将删除 "new" 标签选项。

如果您不想要该选项,这也是可以接受的,因为您正试图将其放入选项列表中。