From: JvD_Ericsson Date: Mon, 7 Nov 2022 12:32:05 +0000 (+0000) Subject: Fix changing property in node filter issue X-Git-Tag: 1.12.1~69 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=b438d70f1262956f94348ff2902b6a472b5eb360;p=sdc.git Fix changing property in node filter issue Changing from a non collection property to a collection property casused the "Add value to list" button to not appear Issue-ID: SDC-4253 Change-Id: I74df0b706c1b7bd7edd57bd05c3043e8c2dd2d1d Signed-off-by: JvD_Ericsson --- diff --git a/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts b/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts index 8c8d1e28ba..6b018c160a 100644 --- a/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts +++ b/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.ts @@ -73,11 +73,9 @@ export class DynamicPropertyComponent { this.propPath = (this.property instanceof PropertyFEModel) ? this.property.name : this.property.propertiesName; this.nestedLevel = (this.property.propertiesName.match(/#/g) || []).length; this.rootProperty = (this.rootProperty) ? this.rootProperty : this.property; - this.propertyTestsId = this.getPropertyTestsId(); - + this.propertyTestsId = this.getPropertyTestsId(); + this.initConsraintsValues(); - - } initConsraintsValues(){ @@ -110,6 +108,12 @@ export class DynamicPropertyComponent { } } + ngOnChanges() { + this.propType = this.property.derivedDataType; + this.propPath = (this.property instanceof PropertyFEModel) ? this.property.name : this.property.propertiesName; + this.propertyTestsId = this.getPropertyTestsId(); + } + onClickPropertyRow = (property, event) => { // Because DynamicPropertyComponent is recrusive second time the event is fire event.stopPropagation = undefined