From d73806c6636286c96eb3edcea359e7b28ae91a9c Mon Sep 17 00:00:00 2001 From: Kim Tran Date: Fri, 2 Feb 2024 08:44:16 +0100 Subject: [PATCH] feat: add emitEvents Input (#98) Co-authored-by: kim.tran --- .../lib/core/directives/patch-form-group-values.driective.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/portal-integration-angular/src/lib/core/directives/patch-form-group-values.driective.ts b/libs/portal-integration-angular/src/lib/core/directives/patch-form-group-values.driective.ts index 8d60955c..68ff26ba 100644 --- a/libs/portal-integration-angular/src/lib/core/directives/patch-form-group-values.driective.ts +++ b/libs/portal-integration-angular/src/lib/core/directives/patch-form-group-values.driective.ts @@ -5,9 +5,10 @@ import { Directive, Input } from '@angular/core' }) export class PatchFormGroupValuesDirective { @Input() formGroup: any + @Input() emitEvents = false @Input() set ocxPatchFormGroupValues(val: any) { if (!val) return - this.formGroup.patchValue(val, { emitEvent: false }) + this.formGroup.patchValue(val, { emitEvent: this.emitEvents }) } }