我从http://tabulator.info/docs/4.2/filter#header-filters复制了代码。
当我按下过滤器值上的Enter键时,表格将返回所有消除过滤器的值。
附加的小提琴:https://jsfiddle.net/9L01mc6v/1/
function buildValues(){
success({
start:start.value,
end:end.value,
});
}
function keypress(e){
if(e.keyCode == 13){
buildValues();
}
if(e.keyCode == 27){
cancel();
}
}
答案 0 :(得分:0)
为什么要在Enter键上再次调用buildValues()?您已经将它绑定到更改和模糊事件,而您只是在三次调用同一函数。
选中此fiddle
if (e.keyCode == 13) {
// buildValues(); // Commented this
}