herum-shared 0.1.34 → 0.1.37
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.
|
@@ -647,14 +647,14 @@ class HerumInputFieldComponent {
|
|
|
647
647
|
})).subscribe();
|
|
648
648
|
}
|
|
649
649
|
setInputsByFormControl() {
|
|
650
|
-
console.log(this.ngControl);
|
|
651
650
|
if (!this.ngControl)
|
|
652
651
|
return;
|
|
653
652
|
if (this.ngControl instanceof FormControlName)
|
|
654
653
|
this.formControlName = this.ngControl.name?.toString() || '';
|
|
655
654
|
this.ngControl.control.statusChanges.pipe(takeUntil(this.destroySubject$)).subscribe(status => {
|
|
656
|
-
|
|
657
|
-
|
|
655
|
+
const controlWithErrorMessage = this.ngControl.control;
|
|
656
|
+
if (!!controlWithErrorMessage.currentErrorMessage)
|
|
657
|
+
this.errorMsg = controlWithErrorMessage.currentErrorMessage;
|
|
658
658
|
const controlStatus = this.ngControl.control.status;
|
|
659
659
|
this.isValid = controlStatus === formStatuses.valid;
|
|
660
660
|
this.isLoading = controlStatus === formStatuses.pending;
|