MrWolfZ / ngrx-forms

Enhance your forms in Angular applications with the power of ngrx
MIT License
374 stars 111 forks source link

`NgrxFormControlDirective`: Update view when `ngrxValueConverter` changes #283

Open MaximSagan opened 2 years ago

MaximSagan commented 2 years ago

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.

daniel-huser commented 10 months ago

We have the same issue