diff --git a/projects/editor/src/app/services/unit.service.ts b/projects/editor/src/app/services/unit.service.ts index abecaa6e7003adbd8761f3e9df2bcf532cd0acfe..ee7cf5a852cc9523212474f498b855234de23145 100644 --- a/projects/editor/src/app/services/unit.service.ts +++ b/projects/editor/src/app/services/unit.service.ts @@ -221,6 +221,11 @@ export class UnitService { if (newElement.type === 'cloze') { (newElement as ClozeElement).getChildElements().forEach((childElement: InputElement) => { childElement.id = this.idService.getNewID(childElement.type); + if ((childElement as UIElement).value instanceof Object) { // replace value Ids with fresh ones (dropList) + (childElement as UIElement).value.forEach((valueObject: { id: string }) => { + valueObject.id = this.idService.getNewID('value'); + }); + } }); } section.elements.push(newElement as PositionedElement);