-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
<ArrayInput>
uses SourceContext
instead of cloning children
#9911
<ArrayInput>
uses SourceContext
instead of cloning children
#9911
Conversation
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.
I'm confused by this PR. It probably requires more tests and more comments to make the code robust and maintainable.
packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIterator.tsx
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/field/TranslatableFieldsTabContent.tsx
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/field/TranslatableFieldsTabContent.tsx
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/field/TranslatableFieldsTabContent.tsx
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIterator.tsx
Outdated
Show resolved
Hide resolved
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.
I think we miss a story where we can see non-humanized input labels, to check that they make sense.
packages/ra-ui-materialui/src/field/TranslatableFieldsTabContent.tsx
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIterator.tsx
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIteratorItem.tsx
Show resolved
Hide resolved
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.
Getting close! 🔥
Problem
<ArrayInput>
and<SimpleFormIterator>
are still cloning their children. Besides,<SimpleFormIterator>
throws an Error when used without a source prop.Solution
Migrate both components to support the
SourceContext
and no longer require cloning their children.This is a BC so this needs to be done before the v5 release.