-
Notifications
You must be signed in to change notification settings - Fork 29
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
setObject -- inconsistent behavior on FormArrays #195
Comments
@jbjhjm it's not a bug, it's a feature :) I'll think about how to solve it |
@EndyKaufman ahhh ok I see :) It was a bit unexpected for me.
For now I'll iterate the root formGroup and clear array entries before repatching. |
fix: setObject -- inconsistent behavior on FormArrays (#195)
@jbjhjm solved in new version https://github.com/EndyKaufman/ngx-dynamic-form-builder/releases/tag/v2.2.1 |
Don't whack me please :'D I think I found another small bug.
setObject seems to handle FormArrays and FormGroups differently:
So let's assume we have a Dynamic FormGroup set up with data like this:
And then run
the form value will become
the naming
setObject
indicates the whole form value will be replaced, in opposite to something likepatchObject
.So I think the current behavior is inconsistent and existing FormArray items should be cleared before adding new controls.
The text was updated successfully, but these errors were encountered: