diff --git a/src/app/shared/form/form.component.ts b/src/app/shared/form/form.component.ts index 79cf8ad2c7..662cd3b4ae 100644 --- a/src/app/shared/form/form.component.ts +++ b/src/app/shared/form/form.component.ts @@ -316,7 +316,7 @@ export class FormComponent implements OnDestroy, OnInit { removeItem($event, arrayContext: DynamicFormArrayModel, index: number): void { const formArrayControl = this.formGroup.get(this.formBuilderService.getPath(arrayContext)) as UntypedFormArray; const event = this.getEvent($event, arrayContext, index, 'remove'); - if (this.formBuilderService.isQualdropGroup(event.model as DynamicFormControlModel)) { + if (this.formBuilderService.isQualdropGroup(event.model as DynamicFormControlModel) && hasValue((event.model as any)?.value)) { // In case of qualdrop value remove event must be dispatched before removing the control from array this.removeArrayItem.emit(event); }