aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-02-20 11:39:22 -0500
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-02-20 11:39:22 -0500
commitc2bcb4ac83ecafb0bf23f72ed1bc2d05b877da6d (patch)
treed7c45a53dd9efd3b7e6864a1bd2be8985812100c /src/client/views/nodes/DocumentView.tsx
parent7cbf63ed6fa7517d5b80fba50529544e0cf1d625 (diff)
filterdocs setup
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 7fa790768..5afbec7e6 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -119,6 +119,8 @@ export interface DocumentViewSharedProps {
cantBrush?: boolean; // whether the document doesn't show brush highlighting
pointerEvents?: string;
scriptContext?: any; // can be assigned anything and will be passed as 'scriptContext' to any OnClick script that executes on this document
+ filterSaveCallback?: () => void;
+ myFiltersCallback?: (doc: Doc) => void;
}
export interface DocumentViewProps extends DocumentViewSharedProps {
// properties specific to DocumentViews but not to FieldView
@@ -1075,7 +1077,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
}
componentDidMount() {
- !BoolCast(this.props.Document.dontRegisterView, this.props.dontRegisterView) && DocumentManager.Instance.AddView(this);
+ !BoolCast(this.props.Document?.dontRegisterView, this.props.dontRegisterView) && DocumentManager.Instance.AddView(this);
}
componentWillUnmount() {
!this.props.dontRegisterView && DocumentManager.Instance.RemoveView(this);