Open kranthitech opened 8 years ago
Could you please reproduce your issue using issue.angular-formly.com? It will help us determine what exactly the problem is that you're describing and how it could be fixed. Thanks!
Hi @kentcdodds , I have tried to reproduce the same issue. http://jsbin.com/pazotafewe/edit?js,output
Ah, yeah, here's the problem:
ng-model
in the template with 'model.' + options.key
.ng-model
needs to actually remain the same.So I suggest that we add a value in extras
of fields to disable/control (via a function) the manipulation of nested keys and then utilize that in the defaultOptions
of this type.
Feel free to makeapullrequest.com!
Note: This will take work in both this repo and the formly core repo.
+1
@hcaloto
i resolved this issue on my local enviroment. I had to make some adjustments in formlyCore to accomodate the use case, as well as modifying the multiCheckbox controller.
Noticed an error with multi select.
If the key is of the form "model", it works fine and the model is bound to an array based on the selected checkboxes But when key is of the form "model.something", it gets bound to a boolean instead of an array, and all the checkboxes get selected or de-selected at once.