mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Fixed issues with filter_columnFilters set to false. Fixes #355
This commit is contained in:
parent
d0adfe288f
commit
ab5ceb9e1d
@ -667,7 +667,7 @@ ts.addWidget({
|
||||
buildDefault(true);
|
||||
}
|
||||
if (e.type === 'filterReset') {
|
||||
$t.find('.tablesorter-filter').val('');
|
||||
searching([]);
|
||||
}
|
||||
if (e.type === 'filterEnd') {
|
||||
buildDefault(true);
|
||||
@ -786,10 +786,13 @@ ts.addWidget({
|
||||
// add default values
|
||||
$t.bind('tablesorter-initialized', function(){
|
||||
ff = ts.getFilters(table);
|
||||
// ff is undefined when filter_columnFilters = false
|
||||
if (ff) {
|
||||
for (i = 0; i < ff.length; i++) {
|
||||
ff[i] = $ths.filter('[data-column="' + i + '"]:last').attr(wo.filter_defaultAttrib) || ff[i];
|
||||
}
|
||||
ts.setFilters(table, ff, true);
|
||||
}
|
||||
});
|
||||
// filter widget initialized
|
||||
$t.trigger('filterInit');
|
||||
|
Loading…
Reference in New Issue
Block a user