aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-09-19 14:52:26 -0400
committerbob <bcz@cs.brown.edu>2019-09-19 14:52:26 -0400
commite95a771cb0bcc3add66ebd28344d6a303e7b2bca (patch)
treec6a8ca2687ef43606ebcae21d4dd97c4d87c1eb5 /src/client/views/nodes/DocumentView.tsx
parenta07a776e50b4d1789b51731f1e447e7be0ef7dba (diff)
fixed mini template menu layout
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index c27e7f4a1..7f3ebe026 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -393,11 +393,11 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
@undoBatch
@action
- toggleCustomView = (): void => {
+ setCustomView = (custom: boolean): void => {
if (this.props.ContainingCollectionView && this.props.ContainingCollectionView.props.DataDoc) {
Doc.MakeMetadataFieldTemplate(this.props.Document, this.props.ContainingCollectionView.props.DataDoc);
} else { // bcz: not robust -- for now documents with string layout are native documents, and those with Doc layouts are customized
- typeof this.props.Document.layout === "string" ? this.makeCustomViewClicked() : this.makeNativeViewClicked();
+ custom ? this.makeCustomViewClicked() : this.makeNativeViewClicked();
}
}