-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Optimizations to improve performance on complex conditional schemas #2466
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
Closed
Closed
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
eef551d
Implementation of If Then Else
Saulzi 51387a0
Fix playground example
nickgros fca3592
Fix resolveSchema to handle more cases
nickgros ba15fd3
Don't remove the root schema after validating
nickgros 75665ca
Warn when encountering error in validation
nickgros 23288ae
Add tests to cover error cases
nickgros 4cf5f7f
Merge branch 'master' of https://github.com/rjsf-team/react-jsonschem…
nickgros 78fc62c
Memoize withIdRefPrefix and prevent recompiling during form validation
nickgros 58d3335
Fix tests
nickgros 5e7a08d
Memoize all the things
nickgros 667903b
Import only memoize from lodash
nickgros ab36d1e
Revert outdated docs reorganization
nickgros b00f49f
Revert `const` changes
nickgros 833006a
Remove default value from enum example
nickgros 8796c9d
Delete `allOf` rather than set to undefined. Fixes liveOmit issue.
nickgros b6c53c8
Merge branch 'master' of https://github.com/rjsf-team/react-jsonschem…
nickgros f72a62c
Added tests
Juansasa 75c4d84
Changed resolve method's name
Juansasa a08c563
Added $ref tests
Juansasa 07a43c8
Merge branch 'master' into conditional-support
nickgros 52747fb
Merge branch 'master' of https://github.com/rjsf-team/react-jsonschem…
nickgros 123c480
Merge branch 'conditional-support' of github.com:nickgros/react-jsons…
nickgros 964f537
Merge branch 'if_then_else' of https://github.com/stakater/react-json…
nickgros 544133b
Merge branch 'master' of https://github.com/rjsf-team/react-jsonschem…
nickgros File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -249,7 +249,8 @@ function SchemaFieldRender(props) { | |
const FieldTemplate = | ||
uiSchema["ui:FieldTemplate"] || registry.FieldTemplate || DefaultTemplate; | ||
let idSchema = props.idSchema; | ||
const schema = retrieveSchema(props.schema, rootSchema, formData); | ||
var schema = retrieveSchema(props.schema, rootSchema, formData); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm assuming all |
||
|
||
idSchema = mergeObjects( | ||
toIdSchema(schema, null, rootSchema, formData, idPrefix), | ||
idSchema | ||
|
@@ -403,7 +404,6 @@ function SchemaFieldRender(props) { | |
</FieldTemplate> | ||
); | ||
} | ||
|
||
class SchemaField extends React.Component { | ||
shouldComponentUpdate(nextProps, nextState) { | ||
return !deepEquals(this.props, nextProps); | ||
|
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not sure what's happening here with these docs changes, they are unrelated to the PR and are also out commented. I guess this should be reverted?