diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-12-03 19:44:25 -0500 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-12-03 19:44:25 -0500 |
commit | af94458be6620ae8a05730f17ee3fc4ec403cf09 (patch) | |
tree | 43ef3dabb13c4fe693a1e70799744f747c84eba3 /src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx | |
parent | d2eef0d1341c475a8cb753efeb31b270714e76ec (diff) |
bunch of changes related to rendering changes to template docs; trying to make it so docs don't need to rerender every time, and so that all attributes are accounted for.
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx index 890bc6f73..95f0da43d 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx @@ -20,4 +20,12 @@ export class TemplateManager { getValidTemplates = (cols: Col[]): Template[] => { return this.templates.filter(template => template.isValidTemplate(cols)); } + + addTemplate = (newTemplate: Template) =>{ + this.templates.push(newTemplate); + } + + removeTemplate = (template: Template) => { + this.templates.splice(this.templates.indexOf(template), 1); + } }
\ No newline at end of file |