Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix omitData for top level array #1406

Merged
merged 4 commits into from
Aug 18, 2019
Merged

Fix omitData for top level array #1406

merged 4 commits into from
Aug 18, 2019

Conversation

Tonexus
Copy link
Contributor

@Tonexus Tonexus commented Aug 14, 2019

Reasons for making this change

Enabling omitData currently converts a top level array to an object. Now includes a check if the form's top level type is an array, and converts back to an array if necessary.

#1396

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@epicfaace
Copy link
Member

Thanks @Tonexus ! Can you add a test?

@Tonexus
Copy link
Contributor Author

Tonexus commented Aug 15, 2019

Ok, added one test to make sure the top level array stays as an array.

@epicfaace epicfaace merged commit 1c856b9 into rjsf-team:master Aug 18, 2019
epicfaace added a commit to epicfaace/react-jsonschema-form that referenced this pull request Aug 19, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants