From 2a40d65b2465bc5c68c6b0d6600f852261b93c4b Mon Sep 17 00:00:00 2001
From: sebo <sebastian.bergandy@external.mgm-cp.com>
Date: Thu, 13 Mar 2025 12:23:19 +0100
Subject: [PATCH] fix: always update invalid params

In order to clear errors.
---
 .../src/lib/form/formcontrol-editor.abstract.component.ts    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.ts b/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.ts
index 0e77b51c10..89c0cd5fb1 100644
--- a/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.ts
+++ b/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.ts
@@ -64,12 +64,15 @@ export abstract class FormControlEditorAbstractComponent implements ControlValue
     this.fieldControl.setValue(text);
     this.setErrors();
   }
+
   registerOnChange(fn: (text: string | Date) => {}): void {
     this.onChange = fn;
   }
+
   registerOnTouched(fn: () => {}): void {
     this.onTouched = fn;
   }
+
   setDisabledState?(isDisabled: boolean): void {
     this.disabled = isDisabled;
   }
@@ -83,9 +86,9 @@ export abstract class FormControlEditorAbstractComponent implements ControlValue
     if (this.control) {
       this.fieldControl.setErrors(this.control.errors);
       if (this.control.invalid) {
-        this._updateInvalidParams();
         this.fieldControl.markAsTouched();
       }
+      this._updateInvalidParams();
     }
   }
 
-- 
GitLab