瀏覽代碼

[editor] Fix asterisk expansion of selected columns

Johan Åhlén 4 年之前
父節點
當前提交
e82af96bb9
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3 5
      desktop/core/src/desktop/js/ko/components/contextPopover/asteriskContextTabs.js

+ 3 - 5
desktop/core/src/desktop/js/ko/components/contextPopover/asteriskContextTabs.js

@@ -29,11 +29,9 @@ class AsteriskData {
     self.hasErrors = ko.observable(false);
     self.hasErrors = ko.observable(false);
     self.columns = [];
     self.columns = [];
 
 
-    self.selectedColumns = ko.pureComputed(() => {
-      return self.columns.filter(column => {
-        return column.selected();
-      });
-    });
+    self.selectedColumns = ko.pureComputed(
+      () => (!self.loading() && self.columns.filter(column => column.selected())) || []
+    );
 
 
     self.expand = function () {
     self.expand = function () {
       const colsToExpand =
       const colsToExpand =