aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-01-21 00:11:41 -0500
committerBob Zeleznik <zzzman@gmail.com>2020-01-21 00:11:41 -0500
commit69e068d77731c25d9f1dbafb8c7d279e343a4e55 (patch)
tree4df35c6233f9440d676e0b7e4758f113e4b10cfc /src/client/views/collections/CollectionStackingViewFieldColumn.tsx
parentd528b9d19a685d8447a9d54715dc94cd66034852 (diff)
fixed up creating template fields in stacking views (+ after the template is made)
Diffstat (limited to 'src/client/views/collections/CollectionStackingViewFieldColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingViewFieldColumn.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
index 23a664359..229a23294 100644
--- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
@@ -142,6 +142,12 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC
const fieldKey = value.substring(1);
const proto = Doc.GetProto(Document);
const created = Docs.Get.DocumentFromField(Document, fieldKey, proto);
+ if (created) {
+ created.title = fieldKey;
+ if (this.props.parent.Document.isTemplateDoc) {
+ Doc.MakeMetadataFieldTemplate(created, this.props.parent.props.Document, true);
+ }
+ }
return created ? addDocument(created) : false;
}
this._createAliasSelected = false;