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