MCPcopy Create free account
hub / github.com/aaronshaf/react-toggle / handleClick

Function handleClick

index.es6.js:42–55  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

40 },
41
42 handleClick(event) {
43 var checkbox = this.refs.input
44 if (event.target !== checkbox)
45 {
46 event.preventDefault()
47 checkbox.focus()
48 checkbox.click()
49 return
50 }
51
52 if (!('checked' in this.props)) {
53 this.setState({checked: checkbox.checked})
54 }
55 },
56
57 handleFocus() {
58 this.setState({hasFocus: true})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…