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

Reimplemented fix in #2198 in @rjsf/utils package #3099

Conversation

heath-freenome
Copy link
Member

@heath-freenome heath-freenome commented Sep 8, 2022

Reasons for making this change

The fix in #2198 is simple and fixes a pretty bad issue (Thanks @QingqiShi)

  • The fix in fix: oneOf anyOf default value always using first option #2198 needed to be refactored into the new @rjsf/utils package
  • Replicated the fix into the getDefaultFormState.ts file
  • Replicated the additional tests into getDefaultFormStateTest.ts and oneOf_test.js
  • All of these change are identical to what is in the original PR with the addition of mocking return values for the utils tests
  • Updated the CHANGELOG.md with the note for this fix along with the notes for PR Fix package links in README files #3094

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

Copy link
Contributor

@nickgros nickgros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @heath-freenome and @QingqiShi

@heath-freenome heath-freenome force-pushed the reimplement-2198-in-utils-package branch from 0f16820 to 17b6608 Compare September 8, 2022 19:00
- The fix in rjsf-team#2198 needed to be refactored into the new `@rjsf/utils` package
- Replicated the fix into the `getDefaultFormState.ts` file
- Replicated the additional tests into `getDefaultFormStateTest.ts` and `oneOf_test.js`
- Updated the `CHANGELOG.md` with the note for this fix along with the notes for PR rjsf-team#3094
@heath-freenome heath-freenome force-pushed the reimplement-2198-in-utils-package branch from 17b6608 to bad1dd6 Compare September 8, 2022 20:00
@heath-freenome heath-freenome merged commit 3a12804 into rjsf-team:master Sep 8, 2022
@heath-freenome heath-freenome deleted the reimplement-2198-in-utils-package branch September 8, 2022 20:45
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