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

前端之家收集整理的这篇文章主要介绍了dojo小例子(30)FilteringSelect至少输入3个字才会触发查询前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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开始的间隔时间,也基本能避免每输入一个字/字符就触发查询

猜你在找的Dojo相关文章