aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/components/Histogram.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-11 13:18:29 -0500
committerbobzel <zzzman@gmail.com>2024-01-11 13:18:29 -0500
commit6f278fdf5882bd7c936d64f4da8bf75c34196311 (patch)
treec4cea30f585ab562585c6b203813b4f52fb65d94 /src/client/views/nodes/DataVizBox/components/Histogram.tsx
parent06aaa5d58b62e7c85a81ce6b592c96cd13d16dd3 (diff)
fixed obervable values not updateing because of component functions being defined as vairables
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/Histogram.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/components/Histogram.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/Histogram.tsx b/src/client/views/nodes/DataVizBox/components/Histogram.tsx
index 9e9a43b34..4a1fb2ed1 100644
--- a/src/client/views/nodes/DataVizBox/components/Histogram.tsx
+++ b/src/client/views/nodes/DataVizBox/components/Histogram.tsx
@@ -105,13 +105,13 @@ export class Histogram extends ObservableReactComponent<HistogramProps> {
componentWillUnmount() {
Array.from(Object.keys(this._disposers)).forEach(key => this._disposers[key]());
}
- componentDidMount = () => {
+ componentDidMount() {
this._disposers.chartData = reaction(
() => ({ dataSet: this._histogramData, w: this.width, h: this.height }),
({ dataSet, w, h }) => dataSet!.length > 0 && this.drawChart(dataSet, w, h),
{ fireImmediately: true }
);
- };
+ }
@action
restoreView = (data: Doc) => {};