是否有一个好的Treeview控件支持Ajax搜索,过滤? [英] Is there a good treeview control supports ajax searching,filtering?

查看:60
本文介绍了是否有一个好的Treeview控件支持Ajax搜索,过滤?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一个支持即时"搜索,过滤(类似于自动完成"框)的javascript树形视图控件.

I have been searching for a javascript treeview control which supports 'on the fly' searching, filtering (similar to auto complete box).

我发现ExtJS具有该功能,但是太大(〜800 KB js).我也喜欢jquery TreeTable控件,但不确定它是否支持该功能.

I found ExtJS which has that feature but it's too big (~800 KB js). I also like jquery TreeTable control but I'm not sure it supports that feature.

请告知.任何建议都值得欢迎,非常感谢.

Please advise. Any suggestion is welcome, thanks a lot.

推荐答案

我建议 jstree ,附带一些不错的插件,例如从服务器获取节点的json插件,以及搜索插件.

I suggest jstree, it does come along with some nice plugins, such as a json plugin to fetch nodes from a server, as well as a search plugin.

这不是理想的搜索行为解决方案,但您可以利用它来发挥自己的优势:

It's not a perfect solution for your desired search behavior but you may use this to your advantage:

"搜索插件可以搜索标题中包含给定字符串的节点,也可以在异步树上使用.所有找到的节点都将jstree-search类应用于它们所包含的节点-您可以使用该类来设置样式搜索结果."

因此,如果您知道所有节点都拥有该类,则可以轻松地预先隐藏所有节点,然后让搜索插件添加该类,以覆盖(!重要)css类的显示属性.

So if you know that all nodes get this class, you could easily hide all nodes beforehand and then let the search plugin add this class which overrides(!important) the display attribute of the css class.

这篇关于是否有一个好的Treeview控件支持Ajax搜索,过滤?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆