diff --git a/projects/common/components/input-elements/checkbox.component.ts b/projects/common/components/input-elements/checkbox.component.ts index 1ac235c9c7da5d751d0475cbff8622b322fb5664..255c5835be9509b49b85e8f6796f79a0e796e2d1 100644 --- a/projects/common/components/input-elements/checkbox.component.ts +++ b/projects/common/components/input-elements/checkbox.component.ts @@ -64,5 +64,5 @@ import { FormElementComponent } from '../../directives/form-element-component.di }) export class CheckboxComponent extends FormElementComponent implements OnInit { @Input() elementModel!: CheckboxElement; - tableMode: boolean = true; + tableMode: boolean = false; } diff --git a/projects/common/models/elements/input-elements/checkbox.ts b/projects/common/models/elements/input-elements/checkbox.ts index 2d602d4d77e2be615ab993c7b19eb7922619a953..db6205c714bcadb24135c885f9c43b0a35a4dc2d 100644 --- a/projects/common/models/elements/input-elements/checkbox.ts +++ b/projects/common/models/elements/input-elements/checkbox.ts @@ -23,12 +23,14 @@ export class CheckboxElement extends InputElement implements CheckboxProperties constructor(element?: CheckboxProperties) { super(element); if (element && isValid(element)) { + this.value = element.value; this.crossOutChecked = element.crossOutChecked; this.styling = { ...element.styling }; } else { if (environment.strictInstantiation) { throw new InstantiationEror('Error at Checkbox instantiation', element); } + if (element?.value !== undefined) this.value = element.value; if (element?.crossOutChecked !== undefined) this.crossOutChecked = element.crossOutChecked; this.dimensions = PropertyGroupGenerators.generateDimensionProps({ width: 215, @@ -69,6 +71,7 @@ export class CheckboxElement extends InputElement implements CheckboxProperties } export interface CheckboxProperties extends InputElementProperties { + value: boolean; crossOutChecked: boolean; styling: BasicStyles; }