diff options
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts index d36b16f16..f46004b0b 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts @@ -99,7 +99,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { onInitMapping() { // selectedTemplates , templateAndMappingMap - this.selectedTemplates = new Map<string, TemplateAndMapping>(); + // this.selectedTemplates = new Map<string, TemplateAndMapping>(); try { const functionMap = this.designerState.template.node_templates[this.functionName].artifacts; console.log(this.templateAndMappingMap); @@ -117,6 +117,10 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { } catch (e) { } } + init() { + this.selectedTemplates = new Map(this.finalTemplates); + } + toNodeProcess(nodeTemplate, functionName) { console.log(nodeTemplate); this.currentFuncion['instance-name'] = functionName; @@ -156,7 +160,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { } addTemplates() { - this.finalTemplates = this.selectedTemplates; + this.finalTemplates = new Map(this.selectedTemplates); } cancel() { this.selectedTemplates = new Map<string, TemplateAndMapping>(); |