aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-09 11:36:56 -0400
committerbobzel <zzzman@gmail.com>2020-10-09 11:36:56 -0400
commitc8e8cbe52a97835342c3a3d04033462f4497cd72 (patch)
tree009b1a3d779fe9cd2eb33f38e35ed60ab5ab4473 /src/client/documents/Documents.ts
parentd4e967ed8fc2f99d44b887ebabf0a4eb642ecaab (diff)
trying to get group updates to work automatically
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 7ee8267f8..7d78bd76a 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -244,6 +244,7 @@ export namespace Docs {
view: LayoutSource,
dataField: string
},
+ data?: any,
options?: Partial<DocumentOptions>
};
type TemplateMap = Map<DocumentType, PrototypeTemplate>;
@@ -464,6 +465,7 @@ export namespace Docs {
const options = { title, type, baseProto: true, ...defaultOptions, ...(template.options || {}) };
options.layout = layout.view?.LayoutString(layout.dataField);
const doc = Doc.assign(new Doc(prototypeId, true), { system: true, layoutKey: "layout", ...options });
+ doc.data = template.data;
doc.layout_keyValue = KeyValueBox.LayoutString("");
return doc;
}