jQuery easyUI中过滤器的应用
问题描述:
jquery easyui中的DataGrid Filter Row这个过滤器。。目前官网看到的demo是输入内容以后立刻进行过滤。。但这样的话会太频繁而且太快。。我想要的效果是当我输入内容以后敲Enter键才会进行过滤。。。不知道有没有用过的人实现过这种功能?还有我如果使用分页的话,这个过滤是对当前页面的数据进行过滤还是对多有页面的数据全部进行过滤。。。。有没有用过的告知一下?非常感谢
网址:http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=dfault&dir=ltr&pitem=
官网里面的DataGrid Filter Row这个选项
答
要修改源代码,找到249行,注释掉下面的代码
http://www.jeasyui.com/easyui/datagrid-filter.js
input.unbind('.filter').bind('keydown.filter', function (e) {
var t = $(this);
if (this.timer) {
clearTimeout(this.timer);
}
if (e.keyCode == 13) {
_doFilter();
}/* else {////////////////////////////////////////////////////
this.timer = setTimeout(function () {
_doFilter();
}, opts.filterDelay);
}*/
});