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
Looking at the generated HTML ng-model="item" for the raw-object node inside an array, which is clearly wrong. For reference, a string node looks like ng-model="modelArray[$index]"
I think this has to do with how the builders are getting applied. In angular-schema-form sf-builder.provider.js the ngModel builder is doing something special when in an array. There's also this comment, // Another builder, i.e. array has overridden the modelValue
// Special Case, an array with just one item in it that is not an object
// So then we just override the modelValue
if (args.form.schema && args.form.schema.items &&
args.form.schema.items.type &&
args.form.schema.items.type.indexOf('object') === -1 &&
args.form.schema.items.type.indexOf('array') === -1) {
var strKey = sfPathProvider.stringify(args.form.key).replace(/''/g, '"') + '[$index]';
state.modelValue = 'modelArray[$index]';
} else {
state.modelName = 'item';
}
So it seems like if this wasn't object would it work? But I know we have (non-raw) objects arrays elsewhere...
Looks like it's working correctly in ASF demo app, just need to verify it's working in Beergarden.
It's almost fixed, but there's still the Invalid Type, expected ["array", "null"] text that's display. You can still submit successfully (since we specifically ignore that error) but it's a little weird.
I think I can fix this to only display an error message if it's an actualy error but probably not worth moving off backlog,
An array of raw objects doesn't update the model correctly.
The text was updated successfully, but these errors were encountered: