Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ember.js 搜索或过滤一个大数据集,这样就不会觉得UI被短暂冻结_Ember.js - Fatal编程技术网

Ember.js 搜索或过滤一个大数据集,这样就不会觉得UI被短暂冻结

Ember.js 搜索或过滤一个大数据集,这样就不会觉得UI被短暂冻结,ember.js,Ember.js,我想找到最好的解决方案,为用户尽可能快速、顺利地过滤余烬中的大型数据集 下面是一个示例,它确实锁定了2500个姓名的列表。例如,尝试执行以“a”开头的搜索 如果解决方案使用了,那么会让它感觉慢的不是搜索/过滤,而是实际呈现结果。余烬列表视图是一个很好的解决方案,将其添加到示例中非常容易 添加余烬列表视图库和所需的css: <script src="http://builds.emberjs.com/list-view/list-view-latest.js"></script&

我想找到最好的解决方案,为用户尽可能快速、顺利地过滤余烬中的大型数据集

下面是一个示例,它确实锁定了2500个姓名的列表。例如,尝试执行以“a”开头的搜索


如果解决方案使用了

,那么会让它感觉慢的不是搜索/过滤,而是实际呈现结果。余烬列表视图是一个很好的解决方案,将其添加到示例中非常容易

添加余烬列表视图库和所需的css:

<script src="http://builds.emberjs.com/list-view/list-view-latest.js"></script>
<style>
.ember-list-view {
  overflow: auto;
  position: relative;
}
.ember-list-item-view {
  position: absolute;
}
</style>
就这样。现在,以“A”开头的搜索返回的速度非常快,没有任何东西被锁定。请在此处尝试:

{{#collection Ember.ListView contentBinding="view.filteredList" height=100 rowHeight=20 width=500}}
  {{name}}
{{/collection}}