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

array of objects with various schemas? #330

Closed
madickson opened this issue Sep 27, 2016 · 1 comment
Closed

array of objects with various schemas? #330

madickson opened this issue Sep 27, 2016 · 1 comment

Comments

@madickson
Copy link

madickson commented Sep 27, 2016

Is it possible to define an array of objects that use different schemas? I've included an example of the model I'm working with, basically a "sections" array that stores objects of various schemas. The user would be able to add a new object to the array and choose what type (schema) to use.

{
  sections: [ // array of objects with multiple possible schemas
    {
      type: 'foo', // enum [foo, bar, baz], decides what props are available in options onChange
      options: {
        ... // varies depending on the type property above
      }
    }
  ]
}
@glasserc
Copy link
Contributor

I think this is a duplicate of #52.

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

3 participants