浏览代码

HUE-3992 [editor] Losing results after resize in results of 100 columns

Johan Ahlen 9 年之前
父节点
当前提交
8ca9351
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      desktop/libs/notebook/src/notebook/templates/editor_components.mako

+ 5 - 3
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -2166,9 +2166,11 @@ ${ hueIcons.symbols() }
     var parent = $(el).parent();
     // When executing few columns -> many columns -> few columns we have to clear the style
     $(el).removeAttr('style');
-    $(el).removeClass('table-huedatatable');
-    if (parent.hasClass('dataTables_wrapper')) {
-      $(el).unwrap();
+    if ($(el).hasClass('table-huedatatable')) {
+      $(el).removeClass('table-huedatatable');
+      if (parent.hasClass('dataTables_wrapper')) {
+        $(el).unwrap();
+      }
     }
     $(el).addClass("dt");