Lazyload: trigger lazyload after filtering. Fixes #1169

This commit is contained in:
Rob Garrison 2016-03-06 11:49:08 -06:00
parent 1547da983e
commit fe33ed9d60

View File

@ -15,11 +15,17 @@
$.event.special.scrollstop.latency = wo.lazyload_latency || 250; $.event.special.scrollstop.latency = wo.lazyload_latency || 250;
} }
ts.lazyload.update( c, wo ); ts.lazyload.update( c, wo );
var events = [ wo.lazyload_update, 'pagerUpdate', wo.columnSelector_updated || 'columnUpdate', '' ] var namespace = c.namespace + 'lazyload ',
.join( c.namespace + 'lazyload ' ); events = [ wo.lazyload_update, 'pagerUpdate', wo.columnSelector_updated || 'columnUpdate', '' ]
c.$table.on( events, function() { .join( namespace );
ts.lazyload.update( c, c.widgetOptions ); 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 ) { update : function( c, wo ) {
// add '.' if not already included // add '.' if not already included