Эх сурвалжийг харах

HUE-8661 [assist] Enable scrollbars in context popover view sql

Johan Ahlen 7 жил өмнө
parent
commit
cbf84f0fb6

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

@@ -6906,7 +6906,14 @@
             res.push('<div class="ace_line ' + additionalClass + '">' + renderedTokens.join('') + '&nbsp;</div>');
           });
 
-          element.innerHTML = '<div class="ace_editor ace-hue"><div class="ace_layer" style="position: static;">' + res.join('') + '</div></div>';
+          element.innerHTML = '<div class="ace_editor ace-hue"' +
+            (options.enableOverflow ? ' style="overflow: initial !important;"' : '') +
+            '><div class="ace_layer" style="position: static;' +
+            (options.enableOverflow ? ' overflow: initial !important;' : '') +
+            '">' + res.join('') + '</div></div>';
+          if (options.enableOverflow) {
+            $(element).css({ 'overflow': 'auto' });
+          }
           $(element).find('.ace_invisible_space').remove();
         });
       }

+ 1 - 1
desktop/core/src/desktop/templates/ko_components/ko_context_popover.mako

@@ -397,7 +397,7 @@ from metadata.conf import has_navigator
             <!-- /ko -->
 
             <!-- ko if: $parent.viewSqlVisible -->
-            <div class="context-popover-sql" data-bind="highlight: { value: $parent.viewSql, formatted: true, dialect: getSourceType() }"></div>
+            <div class="context-popover-sql" data-bind="highlight: { value: $parent.viewSql, enableOverflow: true, formatted: true, dialect: getSourceType() }"></div>
             <!-- /ko -->
             <!-- ko ifnot: $parent.viewSqlVisible -->
             <!-- ko component: { name: 'catalog-entries-list', params: { catalogEntry: $data, onClick: $parent.catalogEntry, onSampleClick: $parent.onSampleClick } } --><!-- /ko -->