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 bf8751d commit 1043b31Copy full SHA for 1043b31
form.js
@@ -15,11 +15,12 @@ export default class Form extends React.Component {
15
children: this.renderChildren(child.props.children, index)
16
});
17
if (child.type.name !== 'TextInput') return child;
18
-
+
19
+ let realIndex = index + recursiveIndex
20
return React.cloneElement(child, {
21
onEnter: () =>
- this.inputs[index + recursiveIndex + 1] ? this.inputs[index + recursiveIndex + 1].focus() : null,
22
- inputRef: ref => (this.inputs[index] = ref),
+ this.inputs[realIndex + 1] ? this.inputs[realIndex + 1].focus() : null,
23
+ inputRef: ref => (this.inputs[realIndex] = ref),
24
25
26
}
0 commit comments