-
-
Notifications
You must be signed in to change notification settings - Fork 82
issue-710 fixed array of objects not validating #711
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
issue-710 fixed array of objects not validating #711
Conversation
|
I would like to give a special thanks to @humoroushorse for helping me find the exact issue. |
|
Thanks for the contribution. @bigmstone / @VineeshJain Any chance you will have some time to review this? |
|
@bigmstone / @VineeshJain Have you guys had any chance to review this PR? |
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 to me. Thanks for your contribution
|
@jdmeyer3 Reverted the code. This fix breaks the basic array functionality of a simple array type field. Any of the actions with type:array failed to load. Some of the sample actions that were breaking are:
Can you please take a relook at this? From the quick look at things, I found that the above actions don't have the |
| return v; | ||
| } | ||
|
|
||
| if (Array.isArray(v) && this.props.spec.items.type === 'object') { |
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.
This is the offending line in the scenario where actions may not above spec.items defined
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.
You guys are right, I did not test with the yaml definition not having the type of item. Let me take another look on how I can distinguish what type of items are in the array.
This PR deals with #710 where if a form has the datatype "array of objects" it would never validate it. It also deals with the string mutation of an array of objects, causing any entered array of objects to be mutated to [object Object].