Skip to content
Snippets Groups Projects
Commit 33dfa361 authored by rhenck's avatar rhenck
Browse files

Radio: Fix duplication

#659
parent 2a6aa1a5
No related branches found
No related tags found
No related merge requests found
Pipeline #60890 failed
......@@ -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,
......
......@@ -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({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment