Why schema is not rendered when properties.length is 0
MGouaillier4CT opened this issue · 1 comments
MGouaillier4CT commented
As i use ASF in my project, i sometimes wish to render forms that don't have any properties. I was wondering why my form was never rendered and i came across this condition :
if (form && schema && schema.type &&
(lastDigest.form !== form || lastDigest.schema !== schema) &&
Object.keys(schema.properties).length > 0) {
lastDigest.schema = schema;
lastDigest.form = form;
render(schema, form);
}
Is there a particular reason why a form need at least one property ?
Anthropic commented
@MGouaillier That's the schema property object and no it doesn't.
It shouldn't be required in the alphas already, it has been commented out in the code and I will most likely remove it once I finish the bit below it.
https://github.com/json-schema-form/angular-schema-form/blob/development/src/directives/sf-schema.directive.js#L199