forked from rjsf-team/react-jsonschema-form
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[V2] Upgrade to react 16 (rjsf-team#1408)
* upgrade to react 16 * bump react peer dependency to 16 * remove react-lifecycles polyfill * unskip react 16 test * Fix array tests, fixes rjsf-team#1427 componentWillReceiveProps is not called after setState, but getDerivedStateFromProps is called after setState. This caused the array key tests to fail, because when onAddIndexClick is called, it sets the state first to update keyedFormData. Only afterwards is the onChange handler called with the new form data. And, getDerivedStateFromProps is called in between, so it ends up being called with the old form data instead of the new one. Used the technique in https://stackoverflow.com/a/57208053 to work around this, by not calculating derived state in getDerivedStateFromProps when keyed form data is updated. * Remove console.error stub to fix tests * Fix getWidget behavior for forwarded refs * Replace componentWillReceiveProps with UNSAFE_componentWillReceiveProps
- Loading branch information
Showing
15 changed files
with
141 additions
and
105 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.