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

Method renderItems

src/FormControl.js:210–235  ·  view source on GitHub ↗
(grid)

Source from the content-addressed store, hash-verified

208 }
209
210 renderItems (grid) {
211 const { children } = this.props;
212
213 let items = (this.state.items || []).map((props, i) => {
214 i += length;
215 if (typeof props === 'string') {
216 return <span key={i} dangerouslySetInnerHTML={{__html: props}} />;
217 }
218 let component = COMPONENTS[props.type];
219 if (component) {
220 this.propsExtend(props);
221 props.key = `${props.label}|${props.name}`;
222 props.$controlId = this.id;
223 props = merge({}, props, grid);
224 return component.render(props);
225 }
226 });
227
228 if (children) {
229 items = items.concat(this.renderChildren(children, items.length));
230 }
231
232 items.push(this.renderTip());
233
234 return items;
235 }
236
237 renderInline (className) {
238 className = classnames(className, getGrid(this.props.grid));

Callers 2

renderInlineMethod · 0.95
renderStackedMethod · 0.45

Calls 4

propsExtendMethod · 0.95
renderChildrenMethod · 0.95
renderTipMethod · 0.95
renderMethod · 0.45

Tested by

no test coverage detected