diff options
author | Fawn <fangrui_tong@brown.edu> | 2019-11-14 23:39:52 -0500 |
---|---|---|
committer | Fawn <fangrui_tong@brown.edu> | 2019-11-14 23:39:52 -0500 |
commit | f108bc9f9f1ff9cad2db4b794e3b433768c342a1 (patch) | |
tree | a2603e85291d118bbea3370ce823ab833e63281a /src/client/views/DocComponent.tsx | |
parent | e3f06e390f98cc5b97d63fc287daff994d5fef6f (diff) | |
parent | c9fbdb9cfd5fcf35f7a599706cb41d4e7e586e19 (diff) |
merged with master
Diffstat (limited to 'src/client/views/DocComponent.tsx')
-rw-r--r-- | src/client/views/DocComponent.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx index ae4b7cf3a..92c947fe6 100644 --- a/src/client/views/DocComponent.tsx +++ b/src/client/views/DocComponent.tsx @@ -34,7 +34,7 @@ export function DocExtendableComponent<P extends DocExtendableProps, T>(schemaCt //TODO This might be pretty inefficient if doc isn't observed, because computed doesn't cache then @computed get Document(): T { return schemaCtor(this.props.Document); } @computed get layoutDoc() { return Doc.Layout(this.props.Document); } - @computed get dataDoc() { return (this.props.DataDoc && this.props.Document.isTemplateField ? this.props.DataDoc : Doc.GetProto(this.props.Document)) as Doc; } + @computed get dataDoc() { return (this.props.DataDoc && (this.props.Document.isTemplateField || this.props.Document.isTemplateDoc) ? this.props.DataDoc : Doc.GetProto(this.props.Document)) as Doc; } @computed get extensionDoc() { return Doc.fieldExtensionDoc(this.dataDoc, this.props.fieldKey); } active = () => !this.props.Document.isBackground && (this.props.Document.forceActive || this.props.isSelected() || this.props.renderDepth === 0);// && !InkingControl.Instance.selectedTool; // bcz: inking state shouldn't affect static tools } |