Filter: prevent setFilter setting same filters after update. Fixes #903 & #733

This commit is contained in:
Mottie 2015-05-16 17:35:54 -05:00
parent f5550fbee0
commit 8c2844b0ce
2 changed files with 5 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -1481,7 +1481,10 @@ ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
filters = false,
c = table ? $( table )[0].config : '',
wo = c ? c.widgetOptions : '';
if ( getRaw !== true && wo && !wo.filter_columnFilters ) {
if ( ( getRaw !== true && wo && !wo.filter_columnFilters ) ||
// setFilters called, but last search is exactly the same as the current
// fixes issue #733 & #903 where calling update causes the input values to reset
( $.isArray(setFilters) && setFilters.join('') === c.lastCombinedFilter ) ) {
return $( table ).data( 'lastSearch' );
}
if ( c ) {