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

Fix behaviour of arrays with minItems and default #655

Closed
wants to merge 0 commits into from

Conversation

spacebaboon
Copy link
Contributor

When providing both default (as a list) and minItems to a field of type array
the defaults are treated as a single value that ends up in each field.

Relates to ticket
#631

Expected behavior

defaults should be treated as a list and be given one entry each, i.e.:

When minItems > default.length provide empty or item-level default fields after the fields with the default values.
When minItems <= default.length provide one field per value in default list.

Actual behavior

The default items gets mashed together into each field

Checklist

  • I'm updating documentation
    • I've checked the rendering of the Markdown text I've added
    • If I'm adding a new section, I've updated the Table of Content
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
    • I've run npm run cs-format on my branch to conform my code to prettier coding style
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

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.

1 participant