diff --git a/projects/common/components/input-elements/drop-list/drag-operator.service.ts b/projects/common/components/input-elements/drop-list/drag-operator.service.ts index 089c966f60e9ff24e1a5f0cf8c1fcb677e236189..d4fb437f8307f18c9ea1a68c8bc9167d8b8f4fdb 100644 --- a/projects/common/components/input-elements/drop-list/drag-operator.service.ts +++ b/projects/common/components/input-elements/drop-list/drag-operator.service.ts @@ -130,8 +130,8 @@ export class DragOperatorService { } this.dragOperation.sourceComponent?.updateFormvalue(); this.dragOperation.targetComponent?.updateFormvalue(); - this.dragOperation.sourceComponent?.refreshItemsFromForm(); - this.dragOperation.targetComponent?.refreshItemsFromForm(); + this.dragOperation.sourceComponent?.refreshViewModel(); + this.dragOperation.targetComponent?.refreshViewModel(); } } @@ -157,7 +157,8 @@ export class DragOperatorService { const originList = this.dropLists[targetList.elementFormControl.value[0].originListID]; this.moveItem(targetList.elementFormControl.value[0], targetList, 0, originList); originList.updateFormvalue(); - originList.refreshItemsFromForm(); + originList.refreshViewModel(); + originList.cdr.detectChanges(); } // TODO haut logisch noch nicht ganz hin mit den festen Indize const targetIndex = this.dragOperation?.sortingPlaceholderIndex !== undefined ? diff --git a/projects/common/components/input-elements/drop-list/drop-list.component.ts b/projects/common/components/input-elements/drop-list/drop-list.component.ts index 902c699981967c6e15f4393534f81e77ffa5e7cd..e7e6540be7162303682436a6804d9135df3308f7 100644 --- a/projects/common/components/input-elements/drop-list/drop-list.component.ts +++ b/projects/common/components/input-elements/drop-list/drop-list.component.ts @@ -108,7 +108,7 @@ export class DropListComponent extends FormElementComponent implements OnInit { this.isHovered = false; this.dragOpService.unSetTargetList(); if (this.elementModel.isSortList) { - this.refreshItemsFromForm(); + this.refreshViewModel(); } this.cdr.detectChanges(); } @@ -156,7 +156,7 @@ export class DropListComponent extends FormElementComponent implements OnInit { this.dragImageRef.instance.styling = this.elementModel.styling; } - refreshItemsFromForm() { + refreshViewModel() { this.viewModel = [...this.elementFormControl.value]; }