diff options
author | 2023-06-08 16:07:43 +0100 | |
---|---|---|
committer | 2023-06-23 11:08:57 +0000 | |
commit | fc3869ca4c430cc29e46bb42125f5672230b83f0 (patch) | |
tree | 28877b9124f6c8ad7613b2ff5b82a43672706702 /catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts | |
parent | 595ae1e392757e4e4b14c6b138de02aacf0d3d5c (diff) |
Provide tosca function capability to complex type fields in composition view
Tosca function capability is provided to all complex type fields in composition view
Issue-ID: SDC-4528
Signed-off-by: Imam hussain <imam.hussain@est.tech>
Change-Id: I3bd0c5b5a44b502d2d5b4a249ce6165db24db8d3
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts index 34ed9a618d..792d9cba60 100644 --- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts +++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts @@ -82,7 +82,6 @@ export class ToscaFunctionComponent implements OnInit, OnChanges { if (!this.isInitialized) { return; } - this.emitValidityChange(); if (this.formGroup.valid) { this.onValidFunction.emit(this.toscaFunctionForm.value); } @@ -111,12 +110,12 @@ export class ToscaFunctionComponent implements OnInit, OnChanges { let keyToFind = [this.compositionMapKey]; let subPropertyToscaFunction = this.property.subPropertyToscaFunctions.find(subPropertyToscaFunction => this.areEqual(subPropertyToscaFunction.subPropertyPath, keyToFind)); - if (subPropertyToscaFunction){ - this.toscaFunction = subPropertyToscaFunction.toscaFunction; - this.toscaFunctionForm.setValue(this.toscaFunction); - this.toscaFunctionTypeForm.setValue(this.toscaFunction.type); - } - return; + if (subPropertyToscaFunction){ + this.toscaFunction = subPropertyToscaFunction.toscaFunction; + this.toscaFunctionForm.setValue(this.toscaFunction); + this.toscaFunctionTypeForm.setValue(this.toscaFunction.type); + } + return; } if (this.property instanceof PropertyDeclareAPIModel && this.property.subPropertyToscaFunctions && (<PropertyDeclareAPIModel> this.property).propertiesName){ let propertiesPath = (<PropertyDeclareAPIModel> this.property).propertiesName.split("#"); @@ -267,6 +266,7 @@ export class ToscaFunctionComponent implements OnInit, OnChanges { } else { this.toscaFunctionForm.setValue(undefined); } + this.emitValidityChange(); } onYamlFunctionValidityChange(validationEvent: YamlFunctionValidationEvent): void { |