-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Don't pass consumed SchemaField class names to child component #439
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
Don't pass consumed SchemaField class names to child component #439
Conversation
… descriptions & titles.
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. |
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. |
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!
Released in v0.43.0. |
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