MCPcopy Create free account
hub / github.com/Lobos/react-ui / constructor

Method constructor

src/CheckboxGroup.js:13–22  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

11
12class CheckboxGroup extends Component {
13 constructor (props) {
14 super(props);
15
16 let values = toArray(props.value, props.sep);
17 this.state = {
18 value: values,
19 data: this.formatData(props.data, values)
20 };
21 this.handleChange = this.handleChange.bind(this);
22 }
23
24 componentWillReceiveProps (nextProps) {
25 if (!deepEqual(nextProps.value, this.props.value)) {

Callers

nothing calls this directly

Calls 2

formatDataMethod · 0.95
toArrayFunction · 0.90

Tested by

no test coverage detected