[CSTPER-3782] custom move events handled correctly

This commit is contained in:
Alessandro Martelli
2021-03-04 11:49:28 +01:00
parent a66ec43ccc
commit 5eb0a8744f
6 changed files with 62 additions and 21 deletions

View File

@@ -448,4 +448,17 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
isFieldToRemove(fieldId, index) {
return this.fieldsOnTheirWayToBeRemoved.has(fieldId) && this.fieldsOnTheirWayToBeRemoved.get(fieldId).includes(index);
}
/**
* Handle the customEvent (ex. drag-drop move event).
* The customEvent is stored inside event.$event
* @param $event
*/
onCustomEvent(event: any) {
this.formOperationsService.dispatchOperationsFromEvent(
this.pathCombiner,
event,
null,
null);
}
}