diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-07-12 18:25:26 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-07-12 18:25:26 -0400 |
commit | c09ccb23ee490b5c1060f734665fd85668a62659 (patch) | |
tree | 609138a0f2d5d33a5e08d673e564c1735888282a /src/client/views/nodes/DataVizBox/DataVizBox.tsx | |
parent | 1447bae0e24016f0c4fde772235d3e60f2b3555c (diff) |
repeat option added to menu; css refactoring
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DataVizBox.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DataVizBox.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx index 86a9db79c..283288013 100644 --- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx +++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx @@ -496,6 +496,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { @action createDocsFromTemplate = (templateInfo: DataVizTemplateInfo) => { + if (!templateInfo.doc) return; const mainCollection = this.DocumentView?.().containerViewPath?.().lastElement()?.ComponentView as CollectionFreeFormView; const fields: string[] = Array.from(Object.keys(this.records[0])); const selectedRows = NumListCast(this.layoutDoc.dataViz_selectedRows); @@ -508,8 +509,8 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { values.forEach((val, i) => {proto[fields[i]] = val as FieldType}); const target = Doc.MakeDelegate(proto); - const targetKey = StrCast(templateInfo.doc.layout_fieldKey, 'layout'); - const applied = this.ApplyTemplateTo(templateInfo.doc, target, targetKey, templateInfo.doc.title + `${row}`); + const targetKey = StrCast(templateInfo.doc!.layout_fieldKey, 'layout'); + const applied = this.ApplyTemplateTo(templateInfo.doc!, target, targetKey, templateInfo.doc!.title + `${row}`); target.layout_fieldKey = targetKey; return applied; }); |