Allow multiple external inputs to work with bindSearch function

This commit is contained in:
Mottie 2013-11-15 00:16:02 -06:00
parent a59c7f46b9
commit d544d46402

View File

@ -708,7 +708,15 @@ ts.filter = {
return; return;
} }
// external searches won't have a filter parameter, so grab the value // external searches won't have a filter parameter, so grab the value
external = $(this).hasClass('tablesorter-filter') ? filter : [ $(this).val() ]; if ($(this).hasClass('tablesorter-filter')) {
external = filter;
} else {
external = [];
$el.each(function(){
// target the appropriate column if the external input has a data-column attribute
external[ $(this).data('column') || 0 ] = $(this).val();
});
}
ts.filter.searching(table, filter, external); ts.filter.searching(table, filter, external);
}); });
}, },