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

Allows definitions with objects #78

Merged

Conversation

bradleymarques
Copy link
Contributor

@bradleymarques bradleymarques commented Apr 21, 2021

Background:

Definitions that were type: "object" caused the following error:

error

Example:

const jsonSchema = {
  type: 'object',
  definitions: {
    address: {
      title: 'Address',
      type: 'object',
      properties: {
        country: { title: 'Country', type: 'string' },
        addressLineOne: { title: 'Address line one', type: 'string' },
      },
    },
  },
}

Cause:

The root cause of the issue was that dataOptions was being lost for things deemed "sections".

Fix:

Assign dataOptions for both "sections" and "cards"

@@ -3,9 +3,7 @@ import PlaygroundContainer from './PlaygroundContainer';

function App() {
return (
<body>
<PlaygroundContainer title='React JSON Schema Form Builder' />
</body>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolves JS warning in the example app

@bradleymarques bradleymarques marked this pull request as ready for review April 21, 2021 14:18
@raymond-lam raymond-lam merged commit bd5139f into ginkgobioworks:main Apr 21, 2021
@bradleymarques bradleymarques deleted the brcm-definitions-with-objects branch April 21, 2021 17:15
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

Successfully merging this pull request may close these issues.

2 participants