Jelajahi Sumber

HUE-989 [editot] Scroll to column in result set does not update the horizontal scroll bar (#904)

* select 'tbody> tr td' to find startCol

* Revert "select 'tbody> tr td' to find startCol"

This reverts commit 313152f

* [FIX][HUE-898] add the horizontal offset of '' (the result table) to the header element to make the condition meaningful (compare in the same coordinate system)

* [MOD] fix code style issue

* [MOD] fix code style issue
linwukang 6 tahun lalu
induk
melakukan
832f6ae359

+ 4 - 1
desktop/core/src/desktop/js/jquery/plugins/jquery.huedatatable.js

@@ -440,7 +440,10 @@ $.fn.hueDataTable = function(oInit) {
           if ($(this).position().left > 0 && startCol == -1) {
           if ($(this).position().left > 0 && startCol == -1) {
             startCol = i;
             startCol = i;
           }
           }
-          if ($(this).position().left < $t.parent().width() + $t.parent().position().left) {
+          if (
+            $(this).position().left + $t.position().left <
+            $t.parent().width() + $t.parent().position().left
+          ) {
             endCol = i;
             endCol = i;
           }
           }
         });
         });