From a147fbc8f026263ea6ee799c02371c68fd749aa9 Mon Sep 17 00:00:00 2001 From: imamSidero Date: Tue, 2 May 2023 18:51:34 +0100 Subject: Fix complex list/map entries in composition view 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 Change-Id: I1d1a33495f3ec45821ee40522c3884e43b380c62 --- .../src/app/directives/property-types/type-list/type-list-directive.ts | 2 +- .../src/app/directives/property-types/type-map/type-map-directive.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.ts b/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.ts index 0d54fc4343..b2d322be1c 100644 --- a/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.ts +++ b/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.ts @@ -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" diff --git a/catalog-ui/src/app/directives/property-types/type-map/type-map-directive.ts b/catalog-ui/src/app/directives/property-types/type-map/type-map-directive.ts index f8fa6dd359..098b28936b 100644 --- a/catalog-ui/src/app/directives/property-types/type-map/type-map-directive.ts +++ b/catalog-ui/src/app/directives/property-types/type-map/type-map-directive.ts @@ -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 -- cgit 1.2.3-korg