-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Infer type from enum if a type is not provided to SelectWidget #1100
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
@edi9999 Could you take a look at this PR please? |
edi9999
reviewed
Dec 13, 2018
edi9999
reviewed
Dec 13, 2018
Connects to #1098 Change-type: minor Signed-off-by: Lucian <lucian.buzzo@gmail.com>
Looks good to me ! Merging ! |
pieplu
pushed a commit
to pieplu/react-jsonschema-form
that referenced
this pull request
Dec 14, 2018
…team#1100) Connects to rjsf-team#1098 Change-type: minor Signed-off-by: Lucian <lucian.buzzo@gmail.com>
pieplu
added a commit
to pieplu/react-jsonschema-form
that referenced
this pull request
Dec 14, 2018
Infer type from enum if a type is not provided to SelectWidget (rjsf-team#1100)
epicfaace
pushed a commit
that referenced
this pull request
Mar 5, 2019
* Infer type from enum if a type is not provided to SelectWidget (#1100) Connects to #1098 Change-type: minor Signed-off-by: Lucian <lucian.buzzo@gmail.com> * No more useless div on schema field not additional * Fix tests (remove useles html) - Revert some test added by https://github.com/mozilla-services/react-jsonschema-form/pull/1123/files - use new css class for form-additional insted layout css class for test selection * Don't use WrapIfAdditonal Component to hav a clerer diff, but adding code duplicate * Use a WrapIfAdditional Component to have a cleanner code / diff * Fix tests * Ignore vscode Ide folder * Remove useless parentProps * Fix old test selector for form additional
CodeGains
pushed a commit
to CodeGains/react-jsonschema-form
that referenced
this pull request
Mar 5, 2019
…team#1158) * Infer type from enum if a type is not provided to SelectWidget (rjsf-team#1100) Connects to rjsf-team#1098 Change-type: minor Signed-off-by: Lucian <lucian.buzzo@gmail.com> * No more useless div on schema field not additional * Fix tests (remove useles html) - Revert some test added by https://github.com/mozilla-services/react-jsonschema-form/pull/1123/files - use new css class for form-additional insted layout css class for test selection * Don't use WrapIfAdditonal Component to hav a clerer diff, but adding code duplicate * Use a WrapIfAdditional Component to have a cleanner code / diff * Fix tests * Ignore vscode Ide folder * Remove useless parentProps * Fix old test selector for form additional
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connects to #1098
Change-type: minor
Signed-off-by: Lucian lucian.buzzo@gmail.com
Reasons for making this change
If a type is not provided in a schema containing an enum and the enum contains values that are not a string, then the form will incorrectly display errors, due to the value of a select always being a string.
This change makes a best effort to infer the type from the
enum
field if thetype
field is not present.Checklist
npm run cs-format
on my branch to conform my code to prettier coding style