Skip to content

Conversation

olzraiti
Copy link
Contributor

Reasons for making this change

Currently SchemaField passes it's classNames prop 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

  • 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'm adding a new feature
    • I've updated the playground with an example use of the feature

@n1k0
Copy link
Collaborator

n1k0 commented Jan 17, 2017

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.

@glasserc
Copy link
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.

@glasserc glasserc merged commit 8038f66 into rjsf-team:master Feb 10, 2017
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!
@n1k0
Copy link
Collaborator

n1k0 commented Feb 22, 2017

Released in v0.43.0.

jariwalabhavesh added a commit to jumpbytehq/react-jsonschema-form that referenced this pull request Mar 10, 2017
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.

3 participants