Skip to content

Commit

Permalink
refactor(form-events): use getRawValue rather than value for `all…
Browse files Browse the repository at this point in the history
…EventsObservable`

Renaming of the functions outstanding beyond this issue.

Addresses ngxtension#491 - Handle getting value from disabled form controls in `form-events` util
  • Loading branch information
michael-small authored and msmallest committed Nov 1, 2024
1 parent 323805f commit b1f27db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/ngxtension/form-events/src/form-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export function allEventsObservable<T>(
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),
Expand Down

0 comments on commit b1f27db

Please sign in to comment.