-
Notifications
You must be signed in to change notification settings - Fork 385
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
create OneOfEnumCell for select inputs #2414
create OneOfEnumCell for select inputs #2414
Conversation
❌ Deploy Preview for jsonforms-examples failed.
|
Hi @edkahara , thank you for the contribution ❤️ Please note that you need to sign the contributor license agreement (CLA) before we can accept your contribution. See this comment: #2414 (comment) |
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.
Hi @edkahara ,
Thanks again for the contribution! The code already looks pretty good to me. I just have one tiny suggestion for a comment.
Could you please add some tests for the new renderer? We try to have at least rudimentary unit tests for all renderers. You can use https://github.com/eclipsesource/jsonforms/blob/master/packages/vanilla-renderers/test/renderers/EnumCell.test.tsx as a starting point for this.
@lucas-koehler Is there any other change required? |
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.
Hi @edkahara thanks again for the contribution and adding these extensive tests ❤️
The code now looks good to me!
Building the example app fails here. However, this is not caused by this PR and building and testing it locally worked fine. Thus, we can still merge this :)
Context: https://jsonforms.discourse.group/t/oneof-not-producing-select-field-or-multiple-choice-checklist-in-vanilla-renderers/2574
OneOfEnumCell
cell that creates select inputs in vanella-renderers.hideEmptyOption
that whentrue
, removes the empty option so the select input only has the options the user passes inoneOf