diff options
author | bobzel <zzzman@gmail.com> | 2023-12-27 15:25:45 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-12-27 15:25:45 -0500 |
commit | cf333a2119629f4172efef3dee08b40776cc660b (patch) | |
tree | 62f6207b93ae8f3908fd1e2b10eefdbc94572ef2 /src | |
parent | aca62448eebfc0844c589f12ab563b9fe1bc42c5 (diff) |
fixed switching dashboards.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index a9474fe93..75c178136 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -276,6 +276,7 @@ export class CollectionDockingView extends CollectionSubView() { return true; } setupGoldenLayout = async () => { + if (this._unmounting) return; //const config = StrCast(this._props.Document.dockingConfig, JSON.stringify(DashboardView.resetDashboard(this._props.Document))); const config = StrCast(this._props.Document.dockingConfig); if (config) { @@ -313,6 +314,7 @@ export class CollectionDockingView extends CollectionSubView() { }; componentDidMount: () => void = async () => { + this._unmounting = false; if (this._containerRef.current) { this._lightboxReactionDisposer = reaction( () => LightboxView.LightboxDoc, @@ -347,7 +349,9 @@ export class CollectionDockingView extends CollectionSubView() { } }; + _unmounting = false; componentWillUnmount: () => void = () => { + this._unmounting = true; try { this._goldenLayout.unbind('stackCreated', this.stackCreated); this._goldenLayout.unbind('tabDestroyed', this.tabDestroyed); |