From d5a5d8671a7ecff657291e5503e0bbace1d5897b Mon Sep 17 00:00:00 2001 From: Michael Small Date: Sun, 15 Sep 2024 12:01:25 -0500 Subject: [PATCH] refactor(form-events): use `getRawValue` rather than `value` for `allEventsObservable` Renaming of the functions outstanding beyond this issue. Addresses #491 - Handle getting value from disabled form controls in `form-events` util --- libs/ngxtension/form-events/src/form-events.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ngxtension/form-events/src/form-events.ts b/libs/ngxtension/form-events/src/form-events.ts index f2941508..cd7b2c08 100644 --- a/libs/ngxtension/form-events/src/form-events.ts +++ b/libs/ngxtension/form-events/src/form-events.ts @@ -99,8 +99,8 @@ export function allEventsObservable( return defer(() => combineLatest([ valueEvents$(form).pipe( - startWith(form.value), - map((value) => (isValueEvent(value) ? value.value : value)), + startWith(form.getRawValue()), + map(() => form.getRawValue()), distinctUntilChanged( (previous, current) => JSON.stringify(previous) === JSON.stringify(current),