Nested schema properties key shared in form object
See original GitHub issuePlunker
When using a schema with nested properties, where the nested property shares the same name as another nested property (see the ‘raw’ property in the example), the form object (as logged to the console in the example) seems to only contain a single property, for the final nested property with that name. It appears the form control property is being overwritten with each occurrence of one with that name.
I would expect the form object to contain a property for each parent schema property with the nested property as a child, in the example:
{
[...form validity etc...]
year: {
raw: [...form element validity etc...]
},
month: {
raw: [...form element validity etc...]
}
}
instead, I see:
{
[...form validity etc...]
raw: [...form element validity etc...]
}
This is causing me problems because I am unable to access the discrete validity etc. of each form control.
I’m sure I must be misunderstanding how ASF works in this regard. If anyone is able to shed any light on this, I’d be very grateful 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (7 by maintainers)
I’ll probably tackle this soon, I’m experiencing the same issues with my getterSetter builder reusing the same object property for an array. I’ve also been meaning to update those templates to wrap inputs in div’s with an ng-class so one can easily set input widths via col-xs-# when using form-horizontal.
This should be working now in the alphas, please re-open if there’s still issues.