From 5748876312afe357154f19659e6ae962e77a5126 Mon Sep 17 00:00:00 2001 From: Sofia Papacharalampous Date: Wed, 15 May 2024 14:14:04 +0300 Subject: [PATCH] fixed bug on description template editor when reordering the inputs --- .../admin/description-template/description-template.module.ts | 2 ++ .../description-template-editor-composite-field.component.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dmp-frontend/src/app/ui/admin/description-template/description-template.module.ts b/dmp-frontend/src/app/ui/admin/description-template/description-template.module.ts index 6508d5949..c88cb1070 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/description-template.module.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/description-template.module.ts @@ -33,6 +33,7 @@ import { DescriptionTemplateEditorReferenceTypeFieldComponent } from './editor/c import { DescriptionFormModule } from '@app/ui/description/editor/description-form/description-form.module'; import { FinalPreviewComponent } from './editor/components/final-preview/final-preview.component'; import { DragulaModule } from 'ng2-dragula'; +import { TransitionGroupModule } from '@app/ui/transition-group/transition-group.module'; @NgModule({ imports: [ @@ -49,6 +50,7 @@ import { DragulaModule } from 'ng2-dragula'; CommonFormattingModule, RichTextEditorModule, DescriptionFormModule, + TransitionGroupModule, DragulaModule.forRoot(), ], declarations: [ diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts index 3f2fa7fc6..73c0bc6d0 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.ts @@ -658,7 +658,7 @@ export class DescriptionTemplateEditorCompositeFieldComponent extends BaseCompon } move(index, direction: "up" | "down" = "up") { - //this.inputs.init(); + this.inputs.init(); if (direction === "up" && this.canGoUp(index)) { let temp = this.fieldsArray.at(index); this.fieldsArray.removeAt(index);