diff --git a/packages/form/src/widget.ts b/packages/form/src/widget.ts index 03a839042..b14bc6a72 100644 --- a/packages/form/src/widget.ts +++ b/packages/form/src/widget.ts @@ -84,7 +84,9 @@ export class ArrayLayoutWidget extends Widget reset(value: any) {} ngAfterViewInit() { - this.formProperty.errorsChanges.subscribe(() => this.cd.detectChanges()); + this.formProperty.errorsChanges + .pipe(filter(() => this.ui.__destroy !== true)) + .subscribe(() => this.cd.detectChanges()); } } @@ -93,6 +95,8 @@ export class ObjectLayoutWidget extends Widget reset(value: any) {} ngAfterViewInit() { - this.formProperty.errorsChanges.subscribe(() => this.cd.detectChanges()); + this.formProperty.errorsChanges + .pipe(filter(() => this.ui.__destroy !== true)) + .subscribe(() => this.cd.detectChanges()); } }