From a8dc9814f491649e59bcfa17039615cd71477db1 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Mon, 7 Mar 2022 12:44:23 +0000 Subject: Support property of type List> Signed-off-by: MichaelMorris Issue-ID: SDC-3898 Change-Id: Ifc9ea422e0eafcf84b5b7e47a9108f62925e2ea0 --- .../ng2/pages/properties-assignment/services/properties.utils.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment') diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/services/properties.utils.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/services/properties.utils.ts index 34d2a53afd..02dbf91868 100644 --- a/catalog-ui/src/app/ng2/pages/properties-assignment/services/properties.utils.ts +++ b/catalog-ui/src/app/ng2/pages/properties-assignment/services/properties.utils.ts @@ -129,7 +129,14 @@ export class PropertiesUtils { if (property.derivedDataType == DerivedPropertyType.LIST || property.derivedDataType == DerivedPropertyType.MAP) { property.flattenedChildren = []; Object.keys(property.valueObj).forEach((key) => { - property.flattenedChildren.push(...this.createListOrMapChildren(property, key, property.valueObj[key])) + property.flattenedChildren.push(...this.createListOrMapChildren(property, key, property.valueObj[key])); + const lastCreatedChild = property.flattenedChildren.slice(-1)[0]; + if (property.schemaType == PROPERTY_TYPES.MAP && property.valueObj[key]){ + const nestedValue:object = property.valueObj[key]; + Object.keys(nestedValue).forEach((keyNested) => { + property.flattenedChildren.push(...this.createListOrMapChildren(lastCreatedChild, keyNested, nestedValue[keyNested])); + }); + }; }); } else if (property.derivedDataType === DerivedPropertyType.COMPLEX) { property.flattenedChildren = this.createFlattenedChildren(property.type, property.name); -- cgit 1.2.3-korg