提交 7f5bfe1d 编写于 作者: G gusreiber

forcing empty filter to exit

上级 e86cf597
...@@ -128,6 +128,16 @@ ConfigTableMetaData.prototype.addFindWidget = function() { ...@@ -128,6 +128,16 @@ ConfigTableMetaData.prototype.addFindWidget = function() {
var findTimeout; var findTimeout;
thisTMD.findInput.keydown(function() { thisTMD.findInput.keydown(function() {
//keydown needs to wait a pulse for the value to be applied to the input.
setTimeout(function(){
var val = thisTMD.findInput.val();
//if the keydown does not set a value, this filtering should exit.
if(val === ''){
return false;
}
if (findTimeout) { if (findTimeout) {
clearTimeout(findTimeout); clearTimeout(findTimeout);
findTimeout = undefined; findTimeout = undefined;
...@@ -136,6 +146,7 @@ ConfigTableMetaData.prototype.addFindWidget = function() { ...@@ -136,6 +146,7 @@ ConfigTableMetaData.prototype.addFindWidget = function() {
findTimeout = undefined; findTimeout = undefined;
thisTMD.showSections(thisTMD.findInput.val()); thisTMD.showSections(thisTMD.findInput.val());
}, 300); }, 300);
},1);
}); });
this.configWidgets.append(findWidget); this.configWidgets.append(findWidget);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册