We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80be5ce commit d16222aCopy full SHA for d16222a
form.js
@@ -9,8 +9,11 @@ export default class Form extends React.Component {
9
10
renderChildren(children) {
11
return React.Children.map(children, (child, index) => {
12
- if (child.children)
13
- return React.cloneElement(child, this.renderChildren(child.children));
+ if (child.props.children)
+ return React.cloneElement(child, {
14
+ ...child.props,
15
+ children: this.renderChildren(child.props.children)
16
+ });
17
if (child.type.name !== 'TextInput') return child;
18
19
return React.cloneElement(child, {
0 commit comments