@energycap/components 0.39.32-ECAP-27075-confirm-bug-textbox-always-showing-even-when-not-requested.20241023-1630 → 0.39.32-ECAP-27075-confirm-bug-textbox-always-showing-even-when-not-requested.20241023-1642

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5240,16 +5240,12 @@ class ConfirmComponent {
5240
5240
  }
5241
5241
  setValidations() {
5242
5242
  const showCheckBox = this.formGroup.get('checkbox');
5243
+ const textBoxControl = this.formGroup.controls['textbox'];
5243
5244
  if (showCheckBox) {
5244
- if (this.showTextBox) {
5245
- this.formGroup.controls['textbox']?.enable();
5246
- }
5247
- else {
5248
- this.formGroup.controls['textbox']?.disable();
5249
- }
5245
+ this.showTextBox ? textBoxControl?.enable() : textBoxControl?.disable();
5250
5246
  }
5251
5247
  else {
5252
- this.formGroup.controls['textbox']?.enable();
5248
+ textBoxControl?.enable();
5253
5249
  }
5254
5250
  }
5255
5251
  /**