Browse Source

HUE-6741 [assist] Make sure we fetch more entries if needed in foreachVisible when there's no initial overflow

Johan Ahlen 8 năm trước cách đây
mục cha
commit
780c7c0

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/assist/assistHdfsEntry.js

@@ -16,7 +16,7 @@
 
 var AssistHdfsEntry = (function () {
 
-  var PAGE_SIZE = 50;
+  var PAGE_SIZE = 100;
 
   /**
    * @param {object} options

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/assist/assistS3Entry.js

@@ -16,7 +16,7 @@
 
 var AssistS3Entry = (function () {
 
-  var PAGE_SIZE = 50;
+  var PAGE_SIZE = 100;
 
   /**
    * @param {object} options

+ 3 - 3
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -4977,6 +4977,9 @@
       var afterRender = function () {
         renderedElements = isTable ? $element.children('tbody').children() : $element.children();
         $container.data('busyRendering', false);
+        if (typeof options.fetchMore !== 'undefined' && endIndex === allEntries.length - 1) {
+          options.fetchMore();
+        }
         huePubSub.publish('foreach.visible.update.heights', id);
       };
 
@@ -5074,9 +5077,6 @@
         lastScrollTop = $container.scrollTop();
 
         setStartAndEndFromScrollTop();
-        if (typeof options.fetchMore !== 'undefined' && endIndex === allEntries.length - 1) {
-          options.fetchMore();
-        }
 
         clearTimeout(renderThrottle);
         var startDiff = Math.abs($parentFVOwnerElement.data('startIndex') - startIndex);