From a2540e53004a7882e3d60065f49697366988db36 Mon Sep 17 00:00:00 2001 From: sgiannopoulos Date: Fri, 5 Jul 2024 18:15:34 +0300 Subject: [PATCH] fieldset order by ordinal --- .../src/app/ui/description/editor/description-editor.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.model.ts b/dmp-frontend/src/app/ui/description/editor/description-editor.model.ts index 802e3118a..42881913e 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.model.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.model.ts @@ -279,7 +279,7 @@ export class DescriptionPropertyDefinitionFieldSetEditorModel implements Descrip public fromModel(item: DescriptionPropertyDefinitionFieldSet, descriptionReferences: DescriptionReference[], definitionFieldSet: DescriptionTemplateFieldSet): DescriptionPropertyDefinitionFieldSetEditorModel { this.fieldSetDefinition = definitionFieldSet; if (item) { - if (item.items) { item.items.map(x => this.items.push(new DescriptionPropertyDefinitionFieldSetItemEditorModel(this.validationErrorModel).fromModel(x, descriptionReferences, definitionFieldSet))); } + if (item.items) { item.items.sort(x=> x.ordinal).map(x => this.items.push(new DescriptionPropertyDefinitionFieldSetItemEditorModel(this.validationErrorModel).fromModel(x, descriptionReferences, definitionFieldSet))); } } return this; }