Skip to content
Snippets Groups Projects
Verified Commit 2a40d65b authored by Sebastian Bergandy's avatar Sebastian Bergandy :keyboard:
Browse files

fix: always update invalid params

In order to clear errors.
parent 5aa76d3e
No related branches found
No related tags found
No related merge requests found
...@@ -64,12 +64,15 @@ export abstract class FormControlEditorAbstractComponent implements ControlValue ...@@ -64,12 +64,15 @@ export abstract class FormControlEditorAbstractComponent implements ControlValue
this.fieldControl.setValue(text); this.fieldControl.setValue(text);
this.setErrors(); this.setErrors();
} }
registerOnChange(fn: (text: string | Date) => {}): void { registerOnChange(fn: (text: string | Date) => {}): void {
this.onChange = fn; this.onChange = fn;
} }
registerOnTouched(fn: () => {}): void { registerOnTouched(fn: () => {}): void {
this.onTouched = fn; this.onTouched = fn;
} }
setDisabledState?(isDisabled: boolean): void { setDisabledState?(isDisabled: boolean): void {
this.disabled = isDisabled; this.disabled = isDisabled;
} }
...@@ -83,9 +86,9 @@ export abstract class FormControlEditorAbstractComponent implements ControlValue ...@@ -83,9 +86,9 @@ export abstract class FormControlEditorAbstractComponent implements ControlValue
if (this.control) { if (this.control) {
this.fieldControl.setErrors(this.control.errors); this.fieldControl.setErrors(this.control.errors);
if (this.control.invalid) { if (this.control.invalid) {
this._updateInvalidParams();
this.fieldControl.markAsTouched(); this.fieldControl.markAsTouched();
} }
this._updateInvalidParams();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment