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 minItems bug with multiSelect and formData #661

Merged
merged 1 commit into from
Aug 9, 2017

Conversation

spacebaboon
Copy link
Contributor

Reasons for making this change

Check to see whether the field is a multiselect (select or checkboxes widget) before adding extra items up to minLength in the defaults.
This was causing extra, invalid items to be added into formData and breaking the minItems validation when no formData is initially present.

Fixes #534

Checklist

  • 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

Check to see whether the field is a multiselect (multiselect or checkboxes widget) before adding extra items up to minLength in the defaults.
This was breaking the minItems validation when no formData is present.
Copy link
Collaborator

@n1k0 n1k0 left a comment

Choose a reason for hiding this comment

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

👍

@n1k0 n1k0 merged commit bfcc32e into rjsf-team:master Aug 9, 2017
@glasserc
Copy link
Contributor

glasserc commented Sep 6, 2017

Released in v0.50.0.

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.

None yet

3 participants