fixed bug with double selection

This commit is contained in:
lotte
2020-01-28 11:29:25 +01:00
parent 6792f75c38
commit 28747314e6
5 changed files with 17 additions and 10 deletions

View File

@@ -305,6 +305,7 @@ export class FormComponent implements OnDestroy, OnInit {
this.formBuilderService.addFormArrayGroup(formArrayControl, arrayContext);
const value = formArrayControl.controls[index].value;
formArrayControl.controls[formArrayControl.length - 1].setValue(value);
formArrayControl.controls[index].setValue(undefined);
formArrayControl.controls[index].reset();
this.addArrayItem.emit(this.getEvent($event, arrayContext, index, 'add'));
this.formService.changeForm(this.formId, this.formModel);