【发布时间】:2016-02-06 21:03:02
【问题描述】:
我有以下选择架构:
首先:我有输入,它会过滤我的选择 Dropbox 结果
第二:在我的结果中总是应该是选项,当我点击它时,我想看到模态窗口(所以,即使我输入了一些文本,这个选项仍然必须在我的 Dropbox 中)
第三...n:默认选项
现在我有了这样的模板:
<ui-select ***mysecretoptions***>
<ui-select-match ***mysecretoptions***>***mysecretoptions***</ui-select-match>
<ui-select-choices***mysecretoptions***>
<span ***mysecretoptions***></span>
</ui-select-choices>
</ui-select>
而且效果很好,但是当我进行一些搜索时,第一个选项会隐藏...
有可能吗,怎么做?
只有当我输入/单击 ui-select 时才会显示第一个选项(因此它不会显示为选中或整个选择框的默认值)
【问题讨论】:
-
一种可能的方法是破解 angular ui-select 库的 select.js 并在 uiSelectConfig 选项中添加一个按钮模板。
标签: javascript angularjs twitter-bootstrap angular-ui-bootstrap angular-ui