您的位置:首页 > 其它

dojo小例子(30)FilteringSelect至少输入3个字才会触发查询

2015-03-15 23:22 399 查看
declare("MyFilteringSelect", FilteringSelect, {
// custom min input character count to trigger search
minKeyCount: 3,

// override search method, count the input length
_startSearch: function (/*String*/key) {
if (!key || key.length < this.minKeyCount) {
this.closeDropDown();
return;
}
this.inherited(arguments);
}
});

原文参考http://stackoverflow.com/questions/15949425/dijit-filteringselect-with-min-length

searchDelay
Delay in milliseconds between when user types something and we start searching based on that value

searchDelay可以设置search开始的间隔时间,也基本能避免每输入一个字/字符就触发查询
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐