Fix complex list/map entries in composition view 27/134427/2
authorimamSidero <imam.hussain@est.tech>
Tue, 2 May 2023 17:51:34 +0000 (18:51 +0100)
committerMichael Morris <michael.morris@est.tech>
Wed, 10 May 2023 14:10:21 +0000 (14:10 +0000)
Complex list/map entries in composition view is visible and can add, edit and delete the entries

Issue-ID: SDC-4482
Signed-off-by: Imam hussain <imam.hussain@est.tech>
Change-Id: I1d1a33495f3ec45821ee40522c3884e43b380c62

catalog-ui/src/app/directives/property-types/type-list/type-list-directive.ts
catalog-ui/src/app/directives/property-types/type-map/type-map-directive.ts

index 0d54fc4..b2d322b 100644 (file)
@@ -140,7 +140,7 @@ export class TypeListDirective implements ng.IDirective {
         });
         //reset valueObjRef when schema type is changed
         scope.$watchCollection('schemaProperty.type', (newData:any):void => {
-            scope.isSchemaTypeDataType = this.isDataTypeForSchemaType(scope.schemaProperty, scope.types);
+            scope.isSchemaTypeDataType = this.DataTypesService.isDataTypeForSchemaType(scope.schemaProperty);
         });
 
         //when user brows between properties in "edit property form"
index f8fa6dd..098b289 100644 (file)
@@ -134,7 +134,7 @@ export class TypeMapDirective implements ng.IDirective {
 
         // reset valueObjRef and mapKeys when schema type is changed
         scope.$watchCollection('schemaProperty.type', (newData: any): void => {
-            scope.isSchemaTypeDataType = this.isDataTypeForSchemaType(scope.schemaProperty, scope.types);
+            scope.isSchemaTypeDataType = this.DataTypesService.isDataTypeForSchemaType(scope.schemaProperty);
             if (scope.valueObjRef) {
                 scope.mapKeys = Object.keys(scope.valueObjRef);
                 // keeping another copy of the keys, as the mapKeys gets overridden sometimes