diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-11-07 23:37:49 -0500 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-11-07 23:37:49 -0500 |
commit | b6ed6542f911694c673b9e324d7387ea16dc7d0b (patch) | |
tree | fa8b2b826592cde686eb5af754aeb86d42cc595a /src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx | |
parent | 8a64d6cac98a561cdce3da467d825ccea813b524 (diff) |
template reset option and fixed preview not rendering on edits after 1st
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx index 292c20a10..11fad3bf1 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx @@ -31,12 +31,6 @@ export class Template { return clone; } - applyFields = () => { - this.contentFields.forEach(field => { - this.mainField - }); - } - getRenderedDoc = () => { const doc: Doc = this.mainField.renderedDoc(); this.contentFields.forEach(field => { @@ -83,6 +77,12 @@ export class Template { }); }; + resetToBase = () => { + this.allFields.forEach(field => { + field.updateRenderedDoc(); + }) + } + isValidTemplate = (cols: Col[]) => { const matches: number[][] = this.getMatches(cols); const maxMatches: number = this.maxMatches(matches); |