Core: Update widgets after sortReset. Fixes #1361

This commit is contained in:
Rob Garrison 2017-04-02 04:03:26 -05:00
parent 4f43c31b7c
commit 440b3f01cb

View File

@ -362,7 +362,17 @@
.bind( 'sortReset' + namespace, function( e, callback ) {
e.stopPropagation();
// using this.config to ensure functions are getting a non-cached version of the config
ts.sortReset( this.config, callback );
ts.sortReset( this.config, function( table ) {
if (table.isApplyingWidgets) {
// multiple triggers in a row... filterReset, then sortReset - see #1361
// wait to update widgets
setTimeout( function() {
ts.applyWidget( table, '', callback );
}, 100 );
} else {
ts.applyWidget( table, '', callback );
}
});
})
.bind( 'updateAll' + namespace, function( e, resort, callback ) {
e.stopPropagation();