Filter: trigger filterFormatters after update. See #1237

This commit is contained in:
Rob Garrison 2016-07-27 21:31:06 -05:00
parent 04f23cebb5
commit ff754c177e
No known key found for this signature in database
GPG Key ID: 0A42D160D71978E1
2 changed files with 6 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -437,6 +437,8 @@
// force a new search since content has changed
c.lastCombinedFilter = null;
c.lastSearch = [];
// update filterFormatters after update - Fixes #1237
c.$table.triggerHandler( 'filterFomatterUpdate' );
}
// pass true ( skipFirst ) to prevent the tablesorter.setFilters function from skipping the first
// input ensures all inputs are updated when a search is triggered on the table
@ -601,8 +603,10 @@
count = 0,
completed = function() {
wo.filter_initialized = true;
// update lastSearch - it gets cleared often
c.lastSearch = c.$table.data( 'lastSearch' );
c.$table.triggerHandler( 'filterInit', c );
tsf.findRows( c.table, c.$table.data( 'lastSearch' ) || [] );
tsf.findRows( c.table, c.lastSearch || [] );
};
if ( $.isEmptyObject( wo.filter_formatter ) ) {
completed();