From fd5bcb3c085e4a9a0d64a7c4f0f5bedf00399e7f Mon Sep 17 00:00:00 2001 From: "CITE\\amentis" Date: Fri, 4 Oct 2024 16:26:50 +0300 Subject: [PATCH] description field set comment ui fix --- .../components/form-field-set/form-field-set.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.ts b/frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.ts index 039ec6b51..a362aaf6b 100644 --- a/frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.ts +++ b/frontend/src/app/ui/description/editor/description-form/components/form-field-set/form-field-set.component.ts @@ -114,9 +114,13 @@ export class DescriptionFormFieldSetComponent extends BaseComponent { deleteMultiplicityField(fieldSetIndex: number): void { const formArray = this.propertiesFormGroup.get('items') as UntypedFormArray; + const fieldSetToDelete = formArray.at(fieldSetIndex) as UntypedFormGroup; + // store comment to display + const comment = fieldSetToDelete.get('comment').value || null; formArray.removeAt(fieldSetIndex); formArray.controls.forEach((fieldSet, index) => { fieldSet.get('ordinal').setValue(index); + fieldSet.get('comment').setValue(comment); }); //Reapply validators