aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx
index 09eb86d20..6b981d77f 100644
--- a/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx
+++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx
@@ -23,10 +23,20 @@ export class Template {
return this.allFields.filter(field => field.getID === id)[0];
}
+ getFieldByTitle = (title: string) => {
+ return this.allFields.filter(field => field.getTitle() === title)[0];
+ }
+
setupMainField = (templateInfo: FieldSettings) => {
return new DynamicField(templateInfo, 1);
}
+ renderUpdates = () => {
+ this.allFields.forEach(field => {
+ field.updateRenderedDoc();
+ });
+ };
+
isValidTemplate = (cols: Col[]) => {
const matches: number[][] = this.getMatches(cols);
const maxMatches: number = this.maxMatches(matches);