From fe744903609e669c5f3048743ceba9268b8dfe0d Mon Sep 17 00:00:00 2001
From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com>
Date: Sat, 7 Dec 2024 19:46:07 -0500
Subject: field superclass

---
 src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 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 add588046..e079af4de 100644
--- a/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx
+++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu/Template.tsx
@@ -12,7 +12,7 @@ import { IDisposer } from "mobx-utils";
 
 export class Template {
 
-    private mainField: DynamicField;
+    mainField: DynamicField;
     private settings: FieldSettings;
 
     constructor(templateInfo: FieldSettings) {
@@ -24,7 +24,12 @@ export class Template {
     get childFields(): Field[] { return this.mainField.getSubfields };
     get allFields(): Field[] { return this.mainField.getAllSubfields };
     get contentFields(): Field[] { return this.allFields.filter(field => field.getViewType === ViewType.STATIC) };
-    get doc(){ return this.mainField.renderedDoc(); };
+    get doc(){ return this.mainField.renderedDoc; };
+    get title() { return this.mainField.getTitle() };
+
+    cleanup = () => {
+        //dispose each subfields disposers, etc.
+    }
 
     cloneBase = () => {
         const clone: Template = new Template(this.settings);
@@ -76,7 +81,7 @@ export class Template {
 
     renderUpdates = () => {
         this.allFields.forEach(field => {
-            field.updateRenderedDoc(field.renderedDoc());
+            field.updateRenderedDoc(field.renderedDoc);
         });
     };
 
-- 
cgit v1.2.3-70-g09d2

