-
Notifications
You must be signed in to change notification settings - Fork 19
feat(Radio/Select): Spread x-jsf-presentation value to option root #17
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
Conversation
|
|
||
| const notNullOption = (opt) => opt.const !== null; | ||
|
|
||
| function flatPresentation(item) { |
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.
Ready for review :)
src/tests/helpers.js
Outdated
| const: 'standard', | ||
| title: 'Standard', | ||
| 'x-jsf-presentation': { | ||
| carrierName: 'Vanilla Lda', |
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.
for consistency sake in regards to internal discussions, should we wrap this in meta just to have everything aligned in case someone combs through the code?
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 only comment i have, i'm happy with this otherwise)
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.
Yes, done!
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.
lets go!
Example
For example, given the following JSON Schema, where each
oneOfcontains ax-jsf-presentation:Without this PR, to access the
costof each option, you'd need to do:Now, you can access it directly with:
In other words, now we move the
x-jsf-presentation's data to the closest parent, removing the key itself, similar to how we already do with the root (checklayoutto compare). Thefields[0]would look like this:Related