aboutsummaryrefslogtreecommitdiff
path: root/src/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2019-02-05 22:37:46 -0500
committerbobzel <zzzman@gmail.com>2019-02-05 22:37:46 -0500
commit4ac7a62d813738b0047caefbcf40d3063ec9e6c1 (patch)
treeb26d6d72f986b05cc8595300efb75af9d8b2183d /src/views/nodes/DocumentView.tsx
parent26af9562cc515627be4be8759b70ebfbab8bb83c (diff)
checkpoint
Diffstat (limited to 'src/views/nodes/DocumentView.tsx')
-rw-r--r--src/views/nodes/DocumentView.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/views/nodes/DocumentView.tsx b/src/views/nodes/DocumentView.tsx
index 334ea1cb2..94fe0440f 100644
--- a/src/views/nodes/DocumentView.tsx
+++ b/src/views/nodes/DocumentView.tsx
@@ -21,6 +21,7 @@ export interface DocumentViewProps {
Document: Document;
DocumentView: Opt<DocumentView> // needed only to set ContainingDocumentView on CollectionViewProps when invoked from JsxParser -- is there a better way?
ContainingCollectionView: Opt<CollectionViewBase>;
+ Data: any;
}
@observer
export class DocumentView extends React.Component<DocumentViewProps> {
@@ -131,15 +132,15 @@ export class DocumentView extends React.Component<DocumentViewProps> {
let bindings = { ...this.props } as any;
for (const key of this.layoutKeys) {
bindings[key.Name + "Key"] = key;
+ let val = this.props.Document.GetField(key);
}
if (bindings.DocumentView === undefined)
bindings.DocumentView = this;
for (const key of this.layoutFields) {
let field = doc.GetField(key);
- if (field && field != WAITING) {
- bindings[key.Name] = field.GetValue();
- }
+ bindings[key.Name] = field && field != WAITING ? field.GetValue() : field;
}
+ console.log("DocumentView Rendering " + doc.Title + " data = " + this.props.Data);
return (
<div className="node" ref={this._mainCont} style={{ width: "100%", height: "100%", }}>
<JsxParser