diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-11-04 04:48:32 -0500 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-11-04 04:48:32 -0500 |
commit | 4ce711a5c497a7b198f4be05325cca217fb0844c (patch) | |
tree | 0b8285d167545cc36c8e19cdd3286b6e327239f2 /src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx | |
parent | ab4bba8fac883fcc8e839b88f2b597d9147dcb9b (diff) |
reworking doc generation from template
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx | 10 |
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); |