()
| 21 | }, |
| 22 | |
| 23 | getInitialState() { |
| 24 | var checked = false; |
| 25 | if ('checked' in this.props) { |
| 26 | checked = this.props.checked |
| 27 | } else if ('defaultChecked' in this.props) { |
| 28 | checked = this.props.defaultChecked |
| 29 | } |
| 30 | return { |
| 31 | checked: !!checked, |
| 32 | hasFocus: false |
| 33 | } |
| 34 | }, |
| 35 | |
| 36 | componentWillReceiveProps(nextProps) { |
| 37 | if ('checked' in nextProps) { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…