From fe33ed9d600ebf4684d5b1adb0aba4275351d056 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sun, 6 Mar 2016 11:49:08 -0600 Subject: [PATCH] Lazyload: trigger lazyload after filtering. Fixes #1169 --- js/widgets/widget-lazyload.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/js/widgets/widget-lazyload.js b/js/widgets/widget-lazyload.js index b072de92..76c7bda3 100644 --- a/js/widgets/widget-lazyload.js +++ b/js/widgets/widget-lazyload.js @@ -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