We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9fcaf1 commit 49e84b4Copy full SHA for 49e84b4
1 file changed
src/withNextInputAutoFocus.js
@@ -1,6 +1,5 @@
1
import React from "react";
2
import PropTypes from "prop-types";
3
-import { isArray } from "lodash";
4
import withFormik from "./withFormik";
5
6
const withNextInputAutoFocusContextType = {
@@ -10,7 +9,7 @@ const withNextInputAutoFocusContextType = {
10
9
};
11
12
const getInputs = children =>
13
- (isArray(children) ? children : [children]).reduce((partialInputs, child) => {
+ React.Children.toArray(children).reduce((partialInputs, child) => {
14
if (child && child.props && child.props.children) {
15
return partialInputs.concat(getInputs(child.props.children));
16
}
0 commit comments