-
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
Fix multiple bugs related to switching between anyOf/oneOf options #1169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I just have a few questions about understanding the logic. Would appreciate if you could explain those a bit more!
@@ -237,7 +237,7 @@ class ObjectField extends Component { | |||
errorSchema={errorSchema[name]} | |||
idSchema={idSchema[name]} | |||
idPrefix={idPrefix} | |||
formData={formData[name]} | |||
formData={(formData || {})[name]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what case(s) would formData
be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formData
can be null if you have just added an item to an array
Fixes #1168 - Fixed a bug that would prevent input fields from rendering when switching between a non-object type option and an object type option - Fixed a bug where options would incorrectly change when entering values if a subschema with multiple required fields is used - Fixed a bug where switching from an object tpye option to a non-object type option would result in an input field containing the value [Object object] Change-type: patch Signed-off-by: Lucian <lucian.buzzo@gmail.com>
5187eda
to
7d2961f
Compare
@epicfaace Can you please re-review this PR when you have a chance? |
Do not mean to rush you @epicfaace , but excited for this fix to land ^_^. |
Fixes #1168
switching between a non-object type option and an object type option
values if a subschema with multiple required fields is used
type option would result in an input field containing the value [Object object]
Change-type: patch
Signed-off-by: Lucian lucian.buzzo@gmail.com
Checklist
npm run cs-format
on my branch to conform my code to prettier coding style