浏览代码

HUE-9013 [editor] Fix issue where the result header is shown on top when switching between chart and grid

Johan Ahlen 6 年之前
父节点
当前提交
65b5c63970
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      desktop/core/src/desktop/js/apps/notebook2/components/ko.snippetResults.js

+ 2 - 1
desktop/core/src/desktop/js/apps/notebook2/components/ko.snippetResults.js

@@ -28,6 +28,7 @@ import { REDRAW_CHART_EVENT } from 'apps/notebook2/events';
 import { EXECUTABLE_UPDATED_EVENT } from 'apps/notebook2/execution/executable';
 import { RESULT_TYPE, RESULT_UPDATED_EVENT } from 'apps/notebook2/execution/executionResult';
 import { attachTracker } from 'apps/notebook2/components/executableStateHandler';
+import { defer } from 'utils/hueUtils';
 
 export const NAME = 'snippet-results';
 
@@ -194,7 +195,7 @@ class SnippetResults extends DisposableComponent {
       if (val) {
         this.showChart(false);
         huePubSub.publish('editor.grid.shown', this);
-        huePubSub.publish(REDRAW_FIXED_HEADERS_EVENT);
+        defer(() => huePubSub.publish(REDRAW_FIXED_HEADERS_EVENT));
         huePubSub.publish('table.extender.redraw');
       }
     });