【发布时间】:2016-10-30 20:35:39
【问题描述】:
我在引导模式窗口中使用 angular-ui-select 和大约 1500 个项目的列表。
用户执行的每个操作都有 2 秒的延迟。 我试图通过使用“最小输入长度”来提高性能,但过滤器不起作用。
Plunkr 示例: https://plnkr.co/edit/H0kbeR4kHfZFjsBnpjBC?p=preview
我的 HTML:
<ui-select multiple sortable="true" ng-model="vm.selected" theme="select2" style="width: 100%;">
<ui-select-match placeholder="Select...">{{ $item.name }}</ui-select-match>
<ui-select-choices repeat="item in vm.items | filter: $select.search" minimum-input-length="2">
<div ng-bind-html="item.name | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
- 有人知道如何提高性能吗?
-
如何应用最小字符过滤器?
谢谢。
【问题讨论】:
标签: angularjs ui-select angular-ui-select