Skip to content

NgrxFormControlDirective: Update view when ngrxValueConverter changes #283

@MaximSagan

Description

@MaximSagan

Describe the bug
When ngrxValueConverter is changed but ngrxFormControlState is not, the view will not be updated.
At a code level, we can easily observe this to be the case by noting that the directive does not use ngOnChanges and that ngrxValueConverter has no setter behavior (like ngrxFormControlState does).

Repro
StackBlitz: https://ngrx-forms-test-29yhcc.stackblitz.io
Note that "price" is using a converter that changes when "tax" changes (see selectors), but when we change tax, we see no change in price.
Click the "Fix" button to monkey-patch NgrxFormControlDirective and see how it should probably work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions