From b438d70f1262956f94348ff2902b6a472b5eb360 Mon Sep 17 00:00:00 2001 From: JvD_Ericsson Date: Mon, 7 Nov 2022 12:32:05 +0000 Subject: 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 --- .../dynamic-property/dynamic-property.component.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'catalog-ui/src/app') 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 -- cgit 1.2.3-korg