-
Notifications
You must be signed in to change notification settings - Fork 559
-
Notifications
You must be signed in to change notification settings - Fork 559
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
Assigning a new model won't update the custom field model #975
Comments
it's an expected behavior since angular doesn't track change of property values in case of object but instead it rely on it's reference. this.model = {
...this.model,
email: 'email',
} |
Is there a way to change a property twice? After changing the value for the first time the custom field loses the reference to the model. https://stackblitz.com/edit/ngx-formly-ui-bootstrap-aj18js?embed=1&file=app/app.component.ts |
that's a bug 😃 |
… a new model fix #975 Triggered by commit: 727e7d5 Travis build: https://travis-ci.org/formly-js/ngx-formly/builds/388891477
fixed in |
Hi @aitboudad |
@krish-ram we currently only support one version (which is the latest one), sorry 🙏 |
@krish-ram I had the same problem using Angular 5. |
I'm submitting a ... (check one with "x")
Current behavior
When changing the form model by assigning it to a new object the custom fields won't update its values while the default fields will.
If the model is updated by changing a model property it will updated in the custom fields but not in the default fields.
Expected behavior
Model in custom field should update when assigning a new model.
Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/ngx-formly-ui-bootstrap-2at8wq?file=app/app.component.ts
Please tell us about your environment:
Windows 10, Microsoft Visual Code, yarn
Language: [all]
Node (for AoT issues):
node --version
= 9.2.1The text was updated successfully, but these errors were encountered: