You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably the easiest way to see this is to check the "Kitchen Sink" example and see "dislike": [null] at the bottom. null is neither a valid string value nor undefined. This trips up the jsonschema library which I'm using in conjunction with this one, because it doesn't check for nulls.
I looked through the code but wasn't able to figure it out. I know that arrays get an empty item added to them if they don't have a default value, but I don't know why it ends up in the output rather than just getting filtered out, like other invalid/non-present attributes do.
The text was updated successfully, but these errors were encountered:
Yes, this is a bit of an ugly problem that I haven't solved yet, basically I add null to the list so that the ng-repeat that repeats over the list can create one empty form element. So it's basically an artifact of a poor solution to a problem.
The real solution I guess would be to handle the extra empty form outside of the ng-repeat and append to the list when something is written in the subform. I'm marking this as a bug.
I also ran into that problem. In my case it would be sufficient if I could disable the extra empty form and make it only show up when the user clicks the add button. Is there a way to achieve this behavior?
It's undocumented... but you can use the form option startEmpty, if its set to true (in the array form definition it starts empty) the array start empty with just an add button.
Probably the easiest way to see this is to check the "Kitchen Sink" example and see
"dislike": [null]
at the bottom.null
is neither a valid string value nor undefined. This trips up the jsonschema library which I'm using in conjunction with this one, because it doesn't check for nulls.I looked through the code but wasn't able to figure it out. I know that arrays get an empty item added to them if they don't have a default value, but I don't know why it ends up in the output rather than just getting filtered out, like other invalid/non-present attributes do.
The text was updated successfully, but these errors were encountered: