AngularJS ui-select: 完全输入时未添加选项

AngularJS ui-select: option not added when typed fully

我正在使用 angular ui-select 并且我希望允许用户 select 使用自动完成的选项,但也允许他们输入在自定义选项中。

我已将控件配置为启用标记但没有标记标签,如下所示:

<ui-select multiple tagging tagging-label="false" ng-model="colors" theme="bootstrap" style="width: 300px;" 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>

下面是一个 plunkr 示例:http://plnkr.co/edit/YW7WloZCds1XIOS6UsNs?p=preview

问题是,当您输入可用颜色中存在的单词并按回车键时,该选项不会变为 selected。

在 plunkr 中,如果您输入 Blue 并按回车键,您可以看到这个。

我哪里错了?

这似乎是一个与使用 tagging-label="false" 有关的已知错误。删除此选项时它可以正常工作,或者您可以找到解决方法。

https://github.com/angular-ui/ui-select/issues/770