diff --git a/projects/common/models/elements/input-elements/radio-button-group-complex.ts b/projects/common/models/elements/input-elements/radio-button-group-complex.ts index 75d016be35ccf4f3f21c8b30ea45b058036fb35e..b7da72536be992e916708ef6281265b9fc7a1f99 100644 --- a/projects/common/models/elements/input-elements/radio-button-group-complex.ts +++ b/projects/common/models/elements/input-elements/radio-button-group-complex.ts @@ -26,7 +26,7 @@ export class RadioButtonGroupComplexElement extends InputElement constructor(element?: RadioButtonGroupComplexProperties) { super(element); if (element && isValid(element)) { - this.options = element.options; + this.options = [...element.options]; this.itemsPerRow = element.itemsPerRow; this.position = { ...element.position }; this.styling = { ...element.styling }; @@ -34,7 +34,7 @@ export class RadioButtonGroupComplexElement extends InputElement if (environment.strictInstantiation) { throw new InstantiationEror('Error at RadioButtonGroupComplex instantiation', element); } - if (element?.options) this.options = element.options; + if (element?.options) this.options = [...element.options]; if (element?.itemsPerRow) this.itemsPerRow = element.itemsPerRow; this.dimensions = PropertyGroupGenerators.generateDimensionProps({ height: 100, diff --git a/projects/common/models/elements/input-elements/radio-button-group.ts b/projects/common/models/elements/input-elements/radio-button-group.ts index 5f1bbcd4fb7c176f67d1f24c062a4e1c9c5f885f..733cc0d2606d6516ae9cad8be8fda67fefeb5e27 100644 --- a/projects/common/models/elements/input-elements/radio-button-group.ts +++ b/projects/common/models/elements/input-elements/radio-button-group.ts @@ -29,7 +29,7 @@ export class RadioButtonGroupElement extends InputElement constructor(element?: RadioButtonGroupProperties) { super(element); if (element && isValid(element)) { - this.options = element.options; + this.options = [...element.options]; this.alignment = element.alignment; this.strikeOtherOptions = element.strikeOtherOptions; this.position = { ...element.position }; @@ -38,7 +38,7 @@ export class RadioButtonGroupElement extends InputElement if (environment.strictInstantiation) { throw new InstantiationEror('Error at RadioButtonGroupElement instantiation', element); } - if (element?.options) this.options = element.options; + if (element?.options) this.options = [...element.options]; if (element?.alignment) this.alignment = element.alignment; if (element?.strikeOtherOptions) this.strikeOtherOptions = element.strikeOtherOptions; this.dimensions = PropertyGroupGenerators.generateDimensionProps({