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

Method setItems

src/FormControl.js:137–160  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

135 }
136
137 setItems (props) {
138 let { label, layout, items, children, ...otherProps} = props;
139 let hints = [];
140
141 this.required = false;
142 if (children) {
143 this.setChildrenHint(hints, children);
144 } else {
145 if (!items) {
146 items = [otherProps];
147 }
148 }
149
150 if (items) {
151 items.forEach((control) => {
152 let hint = this.getHint(control);
153 if (hint) {
154 hints.push(hint);
155 }
156 });
157 }
158
159 this.setState({ items, hints: hints.join(', ') });
160 }
161
162 renderTip () {
163 let { tip, errorText } = this.props;

Callers 2

componentWillMountMethod · 0.95

Calls 2

setChildrenHintMethod · 0.95
getHintMethod · 0.95

Tested by

no test coverage detected