Browse Source

[editor] Fix asterisk expansion of selected columns

Johan Åhlén 4 years ago
parent
commit
e82af96bb9

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

@@ -29,11 +29,9 @@ class AsteriskData {
     self.hasErrors = ko.observable(false);
     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 () {
       const colsToExpand =