Skip to content

Commit

Permalink
feat: add emitEvents Input (#98)
Browse files Browse the repository at this point in the history
Co-authored-by: kim.tran <[email protected]>
  • Loading branch information
KimFFVII and kim.tran authored Feb 2, 2024
1 parent 52fc2c6 commit d73806c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}
}

0 comments on commit d73806c

Please sign in to comment.