intermediate commit

This commit is contained in:
lotte
2020-02-03 12:58:24 +01:00
parent 28747314e6
commit 360abb78de
12 changed files with 114 additions and 84 deletions

View File

@@ -295,7 +295,7 @@ export class FormComponent implements OnDestroy, OnInit {
removeItem($event, arrayContext: DynamicFormArrayModel, index: number): void {
console.log(arrayContext, index);
const formArrayControl = this.formGroup.get(this.formBuilderService.getPath(arrayContext)) as FormArray;
this.removeArrayItem.emit(this.getEvent($event, arrayContext, index, 'remove'));
this.removeArrayItem.emit(this.getEvent($event, arrayContext, index - 1, 'remove'));
this.formBuilderService.removeFormArrayGroup(index, formArrayControl, arrayContext);
this.formService.changeForm(this.formId, this.formModel);
}