aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/DataVizBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DataVizBox.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
index 0cc73f32f..220a082d1 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
@@ -1,4 +1,4 @@
-import { action, computed, ObservableMap, ObservableSet } from 'mobx';
+import { action, computed, ObservableMap } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { Doc, Field, StrListCast } from '../../../../fields/Doc';
@@ -108,6 +108,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
componentDidMount() {
this.props.setContentView?.(this);
this.fetchData();
+ if (!this.layoutDoc._dataVizView) this.layoutDoc._dataVizView = this.dataVizView;
}
fetchData() {
@@ -118,7 +119,6 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
}
render() {
- if (!this.layoutDoc._dataVizView) this.layoutDoc._dataVizView = this.dataVizView;
return !this.pairs?.length ? (
// displays how to get data into the DataVizBox if its empty
<div className="start-message">