summaryrefslogtreecommitdiffstats
path: root/catalog-ui
diff options
context:
space:
mode:
authorshikha0203 <shivani.khare@est.tech>2023-04-14 12:53:16 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-04-18 18:29:02 +0000
commit974764bdb65a7313c546b65c67d49df1de4ea1e1 (patch)
tree030b08813512e6a3a872622264ca18d0d0e9a7bc /catalog-ui
parentb6c9ed78e512e2d96f1725ca3748a5f02b31e7df (diff)
sort data type drop down lists in add property
Issue-ID: SDC-4474 Signed-off-by: shikha0203 <shivani.khare@est.tech> Change-Id: Iaf6c197b7a80bdf1d133858c3f814e7297a832bc
Diffstat (limited to 'catalog-ui')
-rw-r--r--catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts b/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts
index dc9c82d8aa..4b41e7ab25 100644
--- a/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts
+++ b/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts
@@ -291,6 +291,7 @@ export class PropertyFormViewModel {
hasGetFunctionValue: property.isToscaFunction(),
isGetFunctionValid: true,
};
+ this.$scope.editPropertyModel.types.sort((a,b) => a.localeCompare(b));
this.$scope.isPropertyValueOwner = this.isPropertyValueOwner;
this.$scope.propertyOwnerType = this.propertyOwnerType;
this.$scope.modelNameFilter = this.workspaceService.metadata.model;
@@ -317,11 +318,10 @@ export class PropertyFormViewModel {
this.DataTypesService.fetchDataTypesByModel(this.workspaceService.metadata.model).then(response => {
this.$scope.dataTypes = response.data as DataTypesMap;
-
- this.$scope.nonPrimitiveTypes = _.filter(Object.keys(this.$scope.dataTypes), (type:string)=> {
- return this.$scope.editPropertyModel.types.indexOf(type) == -1;
- });
- this.$scope.isLoading = false;
+ this.$scope.nonPrimitiveTypes = _.filter(Object.keys(this.$scope.dataTypes), (type: string) => {
+ return this.$scope.editPropertyModel.types.indexOf(type) == -1 ;
+ }).sort((a, b) => a.localeCompare(b));
+ this.$scope.isLoading = false;
});
//scope methods