diff --git a/lib/core/src/lib/form/components/widgets/date-time/date-time.widget.ts b/lib/core/src/lib/form/components/widgets/date-time/date-time.widget.ts index ba71f3d999e..d4507122368 100644 --- a/lib/core/src/lib/form/components/widgets/date-time/date-time.widget.ts +++ b/lib/core/src/lib/form/components/widgets/date-time/date-time.widget.ts @@ -81,9 +81,9 @@ export class DateTimeWidgetComponent extends WidgetComponent implements OnInit { private updateFormControlState(): void { this.datetimeInputControl.setValidators(this.isRequired() ? [Validators.required] : []); - if (this.field?.readOnly || this.readOnly) { - this.datetimeInputControl.disable({ emitEvent: false }); - } + this.field?.readOnly || this.readOnly + ? this.datetimeInputControl.disable({ emitEvent: false }) + : this.datetimeInputControl.enable({ emitEvent: false }); this.datetimeInputControl.updateValueAndValidity({ emitEvent: false }); } diff --git a/lib/core/src/lib/form/components/widgets/date/date.widget.ts b/lib/core/src/lib/form/components/widgets/date/date.widget.ts index d71d9fc3d14..92bc0183603 100644 --- a/lib/core/src/lib/form/components/widgets/date/date.widget.ts +++ b/lib/core/src/lib/form/components/widgets/date/date.widget.ts @@ -93,9 +93,9 @@ export class DateWidgetComponent extends WidgetComponent implements OnInit, Reac private updateFormControlState(): void { this.dateInputControl.setValidators(this.isRequired() ? [Validators.required] : []); - if (this.field?.readOnly || this.readOnly) { - this.dateInputControl.disable({ emitEvent: false }); - } + this.field?.readOnly || this.readOnly + ? this.dateInputControl.disable({ emitEvent: false }) + : this.dateInputControl.enable({ emitEvent: false }); this.dateInputControl.updateValueAndValidity({ emitEvent: false }); } diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts index 35082a7aa47..49641cee85b 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts @@ -101,9 +101,9 @@ export class DateCloudWidgetComponent extends WidgetComponent implements OnInit, private updateFormControlState(): void { this.dateInputControl.setValidators(this.isRequired() ? [Validators.required] : []); - if (this.field?.readOnly || this.readOnly) { - this.dateInputControl.disable({ emitEvent: false }); - } + this.field?.readOnly || this.readOnly + ? this.dateInputControl.disable({ emitEvent: false }) + : this.dateInputControl.enable({ emitEvent: false }); this.dateInputControl.updateValueAndValidity({ emitEvent: false }); } diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts index 2d601f9b35a..7b1fe79ce35 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts @@ -197,9 +197,9 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI private updateFormControlState(): void { this.dropdownControl.setValidators(this.isRequired() ? [Validators.required] : []); - if (this.field?.readOnly || this.readOnly) { - this.dropdownControl.disable({ emitEvent: false }); - } + this.field?.readOnly || this.readOnly + ? this.dropdownControl.disable({ emitEvent: false }) + : this.dropdownControl.enable({ emitEvent: false }); this.dropdownControl.updateValueAndValidity({ emitEvent: false }); } diff --git a/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.ts b/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.ts index f0801b525ad..f00f110ad3b 100644 --- a/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.ts +++ b/lib/process-services/src/lib/form/widgets/dropdown/dropdown.widget.ts @@ -151,9 +151,9 @@ export class DropdownWidgetComponent extends WidgetComponent implements OnInit, private updateFormControlState(): void { this.dropdownControl.setValidators(this.isRequired() ? [this.customRequiredValidator(this.field)] : []); - if (this.field?.readOnly || this.readOnly) { - this.dropdownControl.disable({ emitEvent: false }); - } + this.field?.readOnly || this.readOnly + ? this.dropdownControl.disable({ emitEvent: false }) + : this.dropdownControl.enable({ emitEvent: false }); this.dropdownControl.updateValueAndValidity({ emitEvent: false }); }