MCPcopy Index your code
hub / github.com/Lobos/react-ui / renderChildren

Method renderChildren

src/FormControl.js:189–208  ·  view source on GitHub ↗
(children, index)

Source from the content-addressed store, hash-verified

187 }
188
189 renderChildren (children, index) {
190 let newChildren = Children.toArray(children).map((child, i) => {
191 //i = index + '.' + i;
192
193 if (typeof child === 'string') {
194 return <span key={i}>{child}</span>;
195 }
196
197 let props = {};
198 if (child.type.isFormItem) {
199 this.propsExtend(props);
200 } else if (child.props && child.props.children === 'object') {
201 props.children = this.renderChildren(child.props.children, i);
202 }
203
204 child = cloneElement(child, props);
205 return child;
206 });
207 return newChildren;
208 }
209
210 renderItems (grid) {
211 const { children } = this.props;

Callers 1

renderItemsMethod · 0.95

Calls 1

propsExtendMethod · 0.95

Tested by

no test coverage detected