Skip to content

Commit 215225a

Browse files
authored
Merge pull request #49 from lalexx/patch-1
Fix for issues #42 and #33
2 parents 0f78c56 + 1501ff0 commit 215225a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.es6.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default React.createClass({
4040
},
4141

4242
handleClick(event) {
43-
var checkbox = this.refs.input
43+
var checkbox = this.input
4444
if (event.target !== checkbox)
4545
{
4646
event.preventDefault()
@@ -82,7 +82,7 @@ export default React.createClass({
8282
<div className="react-toggle-thumb"></div>
8383

8484
<input
85-
ref="input"
85+
ref={ref => {this.input = ref;}}
8686
onFocus={this.handleFocus}
8787
onBlur={this.handleBlur}
8888
className="react-toggle-screenreader-only"

0 commit comments

Comments
 (0)