From 8e4b1ee988ef3d63fc05d49d8508ce2f73a75eae Mon Sep 17 00:00:00 2001 From: TanyaGashtold <61136841+TanyaGashtold@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:44:21 +0300 Subject: [PATCH] FIO-8915: fixed an issue where errors list does not display in formmanager and formview pro (#1092) --- projects/angular-formio/src/FormioBaseComponent.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/angular-formio/src/FormioBaseComponent.ts b/projects/angular-formio/src/FormioBaseComponent.ts index 1c95f7c6..736a6d36 100644 --- a/projects/angular-formio/src/FormioBaseComponent.ts +++ b/projects/angular-formio/src/FormioBaseComponent.ts @@ -445,7 +445,7 @@ export class FormioBaseComponent implements OnInit, OnChanges, OnDestroy { } : { message: error.message || error.toString(), - paths: error.path ? [error.path] : [], + paths: (error.path || error.formattedKeyOrPath) ? [error.path || error.formattedKeyOrPath] : [], } : { message: '', @@ -479,10 +479,6 @@ export class FormioBaseComponent implements OnInit, OnChanges, OnDestroy { }); } } - - if (!this.noAlerts) { - this.formio.showErrors(); - } } if (shouldErrorDisplay) { @@ -493,6 +489,10 @@ export class FormioBaseComponent implements OnInit, OnChanges, OnDestroy { }); } }); + + if (this.formio && !this.noAlerts) { + this.formio.showErrors(errors); + } } focusOnComponet(key: any) {