Better example for per-column filtering..
Better example for per-column filtering..
steveb321
Posts: 2Questions: 0Answers: 0
The current example leaves much to be desired when doing server-side processing and per-column filtering, it really is helpful to give it a delay factor - perhaps something like this could be in the documentation instead...
var do_filter = function(ele) {
/* Filter on the column (the index) of this element */
oTable.fnFilter( ele.value, $("tfoot input").index(ele));
}
$("tfoot input").keyup( function () {
var ele = this;
window.clearTimeout(window.__reports_filter_timeout);
window.__reports_filter_timeout = window.setTimeout(function() { do_filter(ele); }, 300);
});
var do_filter = function(ele) {
/* Filter on the column (the index) of this element */
oTable.fnFilter( ele.value, $("tfoot input").index(ele));
}
$("tfoot input").keyup( function () {
var ele = this;
window.clearTimeout(window.__reports_filter_timeout);
window.__reports_filter_timeout = window.setTimeout(function() { do_filter(ele); }, 300);
});
This discussion has been closed.
Replies
Allan