aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
index b154a3607..9692345a6 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
@@ -21,6 +21,8 @@ import { PDFBox } from '../PDFBox';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { emptyFunction, setupMoveUpEvents } from '../../../../Utils';
import { LinkManager } from '../../../util/LinkManager';
+import { DocumentView } from '../DocumentView';
+import { DocumentManager } from '../../../util/DocumentManager';
export enum DataVizView {
TABLE = 'table',
@@ -178,9 +180,13 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
return false;
}),
emptyFunction,
- () => UndoManager.RunInBatch(this.toggleSidebar, 'toggle sidebar map')
+ () => UndoManager.RunInBatch(this.toggleSidebar, 'toggle sidebar')
);
};
+ getView = async (doc: Doc) => {
+ if (this._sidebarRef?.current?.makeDocUnfiltered(doc) && !this.SidebarShown) this.toggleSidebar();
+ return new Promise<Opt<DocumentView>>(res => DocumentManager.Instance.AddViewRenderedCb(doc, dv => res(dv)));
+ };
@computed get sidebarWidthPercent() {
return StrCast(this.layoutDoc._layout_sidebarWidthPercent, '0%');
}