0
我无法执行与Backgrid的客户端过滤器扩展搜索时从我的收藏得到正确的总记录值totalRows。如何从Backgrid客户端搜索
具体来说,当我在我的键盘上使用退格键。
如果我不使用退格,慢慢打字,这似乎很好地工作:
//Search input field - keyup event
$("input[name='q']").keyup(function() {
console.log('searchcontainer input - keyup event');
console.log($(this).val())
console.log($(this).val().length)
var key = event.keyCode || event.charCode;
if (key == 8) { //'8' == backspace key
console.log('backspace was keyed!')
//how do I refresh the 'totalRecords' property on the collection?
}
console.log((_myCollection.state.totalRecords || "0") + " records found."));
$("#lblRecordsFound").text((_myCollection.state.totalRecords || "0") + " records found.");
});
这似乎是totalRows跳过集合更新时,退格键被触发(?)?
如何在使用退格时获得当前的totalRows?我是否需要重置,取回或刷新集合?我不确定。帮帮我?
我只需要当前显示在网格中,在任何时刻的totalRows。