From b6ed6542f911694c673b9e324d7387ea16dc7d0b Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:37:49 -0500 Subject: template reset option and fixed preview not rendering on edits after 1st --- .../views/nodes/DataVizBox/DocCreatorMenu/Template.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx') 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); -- cgit v1.2.3-70-g09d2