diff options
| author | bob <bcz@cs.brown.edu> | 2020-02-10 19:59:26 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2020-02-10 19:59:26 -0500 |
| commit | 3817c901191e73c8c141a52e202ded0fd12abf6c (patch) | |
| tree | 09dd443b6594321899cda233769feaf71d4e307e /src/client/views/collections/CollectionStackingViewFieldColumn.tsx | |
| parent | a547bf10571c6e45f59fb8205171123da2560c75 (diff) | |
cleanup of summary docs. icons. carousel fwd/back
Diffstat (limited to 'src/client/views/collections/CollectionStackingViewFieldColumn.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingViewFieldColumn.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx index 21982f1ca..3fc05c6b7 100644 --- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx +++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx @@ -285,8 +285,10 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC description: ":" + fieldKey, event: () => { const created = Docs.Create.CarouselDocument([], { _width: 400, _height: 200, title: fieldKey }); if (created) { - if (this.props.parent.Document.isTemplateDoc) { - Doc.MakeMetadataFieldTemplate(created, this.props.parent.props.Document); + const container = this.props.parent.Document.resolvedDataDoc ? Doc.GetProto(this.props.parent.Document) : this.props.parent.Document; + if (container.isTemplateDoc) { + Doc.MakeMetadataFieldTemplate(created, container); + return Doc.AddDocToList(container, Doc.LayoutFieldKey(container), created); } return this.props.parent.props.addDocument(created); } |
