Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrays of types other than Object do not work well #6

Closed
ulabs-sgiroux opened this issue Sep 27, 2016 · 0 comments
Closed

Arrays of types other than Object do not work well #6

ulabs-sgiroux opened this issue Sep 27, 2016 · 0 comments

Comments

@ulabs-sgiroux
Copy link
Collaborator

Desired:
const schema = { identifier: Schema.SchemaTypes.number(), notes: Schema.SchemaTypes.string(), myArray: Schema.SchemaTypes.arrayOf(Schema.SchemaTypes.string())(), };
What goes wrong? The ElementRow does not show any input elements other than add/trash.

Contrast:
const schema = { identifier: Schema.SchemaTypes.number(), notes: Schema.SchemaTypes.string(), myArray: Schema.SchemaTypes.arrayOf({workaround: Schema.SchemaTypes.string()})(), };
Why does this work? props.type is used in ElementRow as _.map(Object.keys(props.type), ...). This does not work well when props.type is a function with no keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant