【发布时间】:2015-04-18 20:50:17
【问题描述】:
请参阅下面的代码,当通过在“Fr”中键入内容从输入中选择一个选项时,所有以法国开头的国家都会出现,但是在选择输入后,输入字段不会被清除
<ui-select multiple
ng-model="quote.targetLanguage"
reset-search-input="true"
theme="bootstrap"
ng-disabled="disabled"
close-on-select="false"
style="width: 800px;">
<ui-select-match placeholder="Select person...">
{{$item.language}}
</ui-select-match>
<ui-select-choices repeat="lang in controllersData.languages | filter: $select.search">
<div ng-bind-html="lang.language | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
【问题讨论】:
-
你用的是什么版本的 ui-select?
-
* 版本:0.9.8 - 2015-02-16T15:10:00.891Z
-
您能否尝试使用版本 0.9.5 只是好奇我目前使用的那个清除搜索在那里工作。所以如果你更改版本后仍然没有清除搜索,那么肯定有其他问题,但让我们先清除版本问题
-
还是一样
-
我刚刚浏览了源代码,似乎如果使用多个 reset-search-input 被忽略,由于某种原因,所以我的建议是使用 on-select 功能来清除搜索$select 的字段