Quellcode durchsuchen

HUE-6653 [assist] Fix issue where some of the last tables aren't shown in the assist for certain window heights

This occurs if the panel size is very close to the total size of the amount of tables (difference to last table is smaller than the increment size limit)
Johan Ahlen vor 8 Jahren
Ursprung
Commit
1ad8678bba
1 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
  1. 6 2
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

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

@@ -5062,8 +5062,12 @@
         }
         }
 
 
         clearTimeout(renderThrottle);
         clearTimeout(renderThrottle);
-        if (Math.abs($parentFVOwnerElement.data('startIndex') - startIndex) > incrementLimit ||
-            Math.abs($parentFVOwnerElement.data('endIndex') - endIndex) > incrementLimit) {
+        var startDiff = Math.abs($parentFVOwnerElement.data('startIndex') - startIndex);
+        var endDiff = Math.abs($parentFVOwnerElement.data('endIndex') - endIndex);
+        if (startDiff > incrementLimit
+          || endDiff > incrementLimit
+          || (startDiff !== 0 && startIndex === 0)
+          || (endDiff !== 0 && endIndex === allEntries.length - 1))  {
           renderThrottle = setTimeout(render, 0);
           renderThrottle = setTimeout(render, 0);
         }
         }
       };
       };