Skip to content
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 custom boolean option labels using oneOf schemas #1137

Merged
merged 12 commits into from
Jan 19, 2019
Merged

Fix custom boolean option labels using oneOf schemas #1137

merged 12 commits into from
Jan 19, 2019

Conversation

pushred
Copy link
Contributor

@pushred pushred commented Jan 19, 2019

Reasons for making this change

As previously reported in the following issues specifying boolean options with a oneOf schema does not work as expected.

These issues all essentially result from a lack of support for oneOf in BooleanWidget altogether. This implements that support with a similar approach to the optionsList utility.

I've also added the ability to override true/false ordering for boolean options by defining a custom enum: [false, true] pair. This is entirely separate of oneOf but it makes behavior consistent between the two schema options.

Checklist

  • I'm updating documentation
    • I've checked the rendering of the Markdown text I've added
    • If I'm adding a new section, I've updated the Table of Content
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
    • I've run npm run cs-format on my branch to conform my code to prettier coding style
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@epicfaace epicfaace merged commit 98d7bc3 into rjsf-team:master Jan 19, 2019
@epicfaace
Copy link
Member

Merged, thanks @pushred !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants