fixed bug on description template editor when reordering the inputs

This commit is contained in:
Sofia Papacharalampous 2024-05-15 14:14:04 +03:00
parent 02d4a1e9d0
commit 5748876312
2 changed files with 3 additions and 1 deletions

View File

@ -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: [

View File

@ -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);