Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NgrxFormControlDirective: Update view when ngrxValueConverter changes #283

Open
MaximSagan opened this issue Jun 23, 2022 · 1 comment
Open
Labels

Comments

@MaximSagan
Copy link

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.

@MaximSagan MaximSagan added the bug label Jun 23, 2022
@MaximSagan MaximSagan changed the title Update view when ngrxValueConverter changes Update view when ngrxValueConverter changes Jun 23, 2022
@MaximSagan MaximSagan changed the title Update view when ngrxValueConverter changes NgrxFormControlDirective: Update view when ngrxValueConverter changes Jun 23, 2022
@daniel-huser
Copy link

We have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants