Skip to content

Commit

Permalink
Lazyload: trigger lazyload after filtering. Fixes #1169
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Mar 6, 2016
1 parent 1547da9 commit fe33ed9
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions js/widgets/widget-lazyload.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@
$.event.special.scrollstop.latency = wo.lazyload_latency || 250;
}
ts.lazyload.update( c, wo );
var events = [ wo.lazyload_update, 'pagerUpdate', wo.columnSelector_updated || 'columnUpdate', '' ]
.join( c.namespace + 'lazyload ' );
c.$table.on( events, function() {
ts.lazyload.update( c, c.widgetOptions );
});
var namespace = c.namespace + 'lazyload ',
events = [ wo.lazyload_update, 'pagerUpdate', wo.columnSelector_updated || 'columnUpdate', '' ]
.join( namespace );
c.$table
.on( events, function() {
ts.lazyload.update( c, c.widgetOptions );
})
.on( 'filterEnd' + namespace, function() {
// give lazyload a nudge after filtering the table. Fixes #1169
$(window).scroll();
});
},
update : function( c, wo ) {
// add '.' if not already included
Expand Down

0 comments on commit fe33ed9

Please sign in to comment.