summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/properties-inputs/derived-fe-property.ts
diff options
context:
space:
mode:
authorimamSidero <imam.hussain@est.tech>2023-01-04 15:16:31 +0000
committerMichael Morris <michael.morris@est.tech>2023-01-05 09:54:53 +0000
commit01482efa58dd30e82e640f237a654b8b079a7554 (patch)
treef3c0e8b665ac1ea09dc7c5c6cf0fcdb9697f4fa7 /catalog-ui/src/app/models/properties-inputs/derived-fe-property.ts
parent8137832ef9e5163fca232e7152c4ba55b7ef6350 (diff)
Bug fix for list of map values in properties
Fixed list of map values in properties assignment page Issue-ID: SDC-4315 Signed-off-by: Imam hussain <imam.hussain@est.tech> Change-Id: I3d4fcc11327bbc38d1ec24a06ca45aedcfb47ce1
Diffstat (limited to 'catalog-ui/src/app/models/properties-inputs/derived-fe-property.ts')
-rw-r--r--catalog-ui/src/app/models/properties-inputs/derived-fe-property.ts20
1 files changed, 11 insertions, 9 deletions
diff --git a/catalog-ui/src/app/models/properties-inputs/derived-fe-property.ts b/catalog-ui/src/app/models/properties-inputs/derived-fe-property.ts
index 60d2726575..3985b98c93 100644
--- a/catalog-ui/src/app/models/properties-inputs/derived-fe-property.ts
+++ b/catalog-ui/src/app/models/properties-inputs/derived-fe-property.ts
@@ -69,16 +69,18 @@ export class DerivedFEProperty extends PropertyBEModel {
this.propertiesName = parentName + '#' + this.name;
if (property.type == PROPERTY_TYPES.LIST) {
- if(property.value != null) {
- const valueJson = JSON.parse(property.value);
- if (key != '') {
- this.mapKey = key;
- }else{
- let indexNumber = Number(Object.keys(valueJson).sort().reverse()[0]) + 1;
- this.mapKey = indexNumber.toString();
+ if (property.schemaType != PROPERTY_TYPES.MAP) {
+ if(property.value != null) {
+ const valueJson = JSON.parse(property.value);
+ if (key != '') {
+ this.mapKey = key;
+ }else{
+ let indexNumber = Number(Object.keys(valueJson).sort().reverse()[0]) + 1;
+ this.mapKey = indexNumber.toString();
+ }
+ }else {
+ this.mapKey = "0";
}
- }else {
- this.mapKey = "0";
}
this.mapKeyError = null;
this.type = property.schema.property.type;