Don't pass consumed SchemaField class names to child component#439
Merged
Conversation
… descriptions & titles.
Collaborator
|
I don't properly understand the patch and its related use case, sorry. Would you mind adding a test case so we make clear what it's supposed to address? Also, a comment above the modified line with a reference to this PR might be helpful to readers. |
Contributor
|
After poking around this code for a while, I think it's OK, and I don't see any reason not to merge it, since you can explicitly provide class names to any nested field you want already. |
n1k0
added a commit
that referenced
this pull request
Feb 22, 2017
Highlights --- - Improved performance and reactivity. - More consistent validation behavior and UX for array field items. Backward incompatible changes --- - `ObjectField` and `ArrayField` are now stateless components, their local state handling has been dropped entirely, resulting in large performance improvements. - The `defaultFieldValue` helper from the `utils` module has been removed, as it wasn't used anymore. New features --- * Fix #411: Enable required field on radio options. (#469) * Spread `formContext` to `ArrayTemplateField`, `files` and `multiselect` arrays (#456) * From #471: Non-nullable array item fields are now marked as required in the UI. Bugfixes --- * Don't pass consumed `SchemaField` class names to child component (#439) * Turn `ObjectField` and `ArrayField` into stateless components (#480) * Fix #471: Drop default value initialization at the widget level. (#476) Kudos --- Special thanks to @crumblix and @knilink for their help on this release. You guys rock!
Collaborator
|
Released in v0.43.0. |
jariwalabhavesh
added a commit
to jumpbytehq/react-jsonschema-form
that referenced
this pull request
Mar 10, 2017
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reasons for making this change
Currently SchemaField passes it's
classNamesprop as-is to the child component. It shouldn't be passed, because SchemaField consumes the given class name. I tried to put some borders to a deeply nested field and I ended up with nested borders, because the nested fields use SchemaField and each of them rerendered the class name.Checklist