Skip to content

Commit

Permalink
Fix form generation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aldeed committed Dec 11, 2017
1 parent fef0d1f commit 0c2a772
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions imports/plugins/core/ui/client/components/forms/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,16 @@ class Form extends Component {
}

renderField(field, additionalFieldProps) {
const { schema } = this.props;
const { fieldName } = field;

if (this.isFieldHidden(fieldName) === false) {
const fieldSchema = this.schema[fieldName];
const fieldSchema = schema.getDefinition(fieldName);
const fieldProps = {
...fieldSchema,
name: fieldName,
type: typeof fieldSchema.type(),
// This assumes that oneOf is not used for any schema types
type: typeof fieldSchema.type[0].type(),
...additionalFieldProps
};

Expand Down

0 comments on commit 0c2a772

Please sign in to comment.