Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (0, _toArray2['default'])(children).map(function handler(child) {
// eslint-disable-line
if (!child) {
return null;
}
if (child && child.props.children) {
// null or String has no Prop
return _react2['default'].createElement(
_rcTree.TreeNode,
(0, _extends3['default'])({}, child.props, { key: child.key }),
recursive(child.props.children)
);
}
return _react2['default'].createElement(_rcTree.TreeNode, (0, _extends3['default'])({}, child.props, { key: child.key }));
});
};
className = props.className;
var checkable = props.checkable;
return _react2['default'].createElement(
_rcTree2['default'],
(0, _extends3['default'])({}, props, { className: className, checkable: checkable ? _react2['default'].createElement('span', { className: prefixCls + '-checkbox-inner' }) : checkable }),
this.props.children
);
}
}]);
return Tree;
}(_react2['default'].Component);
exports['default'] = Tree;
Tree.TreeNode = _rcTree.TreeNode;
Tree.defaultProps = {
prefixCls: 'ant-tree',
checkable: false,
showIcon: false,
openAnimation: _openAnimation2['default']
};