diff options
author | bobzel <zzzman@gmail.com> | 2023-08-17 13:24:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-17 13:24:03 -0400 |
commit | 0ff267634af5fe833541ddc1bc792a9362260a01 (patch) | |
tree | 39feb1d18c1005f394a06317616cfff9d0c836c0 /src/client/views/nodes/DataVizBox/DataVizBox.tsx | |
parent | 53d0d31e37ef4ab6fb1ef0c8d9d1e9542b8b5598 (diff) | |
parent | 5e8a263c2d891370467f0faccf3330179cedd699 (diff) |
Merge pull request #209 from brown-dash/data-visualization-sarah
DataViz small bug fixes
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DataVizBox.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DataVizBox.tsx | 4 |
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 059c39c68..9c59fcd13 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'; @@ -155,6 +155,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { componentDidMount() { this.props.setContentView?.(this); this.fetchData(); + if (!this.layoutDoc._dataVizView) this.layoutDoc._dataVizView = this.dataVizView; } fetchData() { @@ -165,7 +166,6 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { } render() { - if (!this.layoutDoc._dataViz) this.layoutDoc._dataViz = this.dataVizView; return !this.pairs?.length ? ( // displays how to get data into the DataVizBox if its empty <div className="start-message">To create a DataViz box, either import / drag a CSV file into your canvas or copy a data table and use the command 'ctrl + p' to bring the data table to your canvas.</div> |