radon-select
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -121,3 +121,3 @@ 'use strict'; | ||
this.isFocusing = true; | ||
this.refs['option' + this.state.selectedOptionIndex].focus(); | ||
this.focus(this.refs['option' + this.state.selectedOptionIndex]); | ||
} | ||
@@ -189,5 +189,5 @@ }); | ||
if (!this.state.open) { | ||
this.refs['currentOption'].focus(); //eslint-disable-line dot-notation | ||
this.focus(this.refs['currentOption']); //eslint-disable-line dot-notation | ||
} else { | ||
ReactDOM.findDOMNode(this.refs['option' + (this.state.selectedOptionIndex || 0)]).focus(); | ||
this.focus(this.refs['option' + (this.state.selectedOptionIndex || 0)]); | ||
} | ||
@@ -289,2 +289,5 @@ }); | ||
}, | ||
focus: function focus(ref) { | ||
ReactDOM.findDOMNode(ref).focus(); | ||
}, | ||
renderChild: function renderChild(child, index) { | ||
@@ -291,0 +294,0 @@ return React.cloneElement(child, { |
{ | ||
"name": "radon-select", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "React select box replacement component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -122,3 +122,3 @@ 'use strict'; | ||
this.isFocusing = true; | ||
this.refs['option' + this.state.selectedOptionIndex].focus(); | ||
this.focus(this.refs['option' + this.state.selectedOptionIndex]); | ||
} | ||
@@ -191,5 +191,5 @@ }); | ||
if (!this.state.open) { | ||
this.refs['currentOption'].focus(); //eslint-disable-line dot-notation | ||
this.focus(this.refs['currentOption']); //eslint-disable-line dot-notation | ||
} else { | ||
ReactDOM.findDOMNode(this.refs['option' + (this.state.selectedOptionIndex || 0)]).focus(); | ||
this.focus(this.refs['option' + (this.state.selectedOptionIndex || 0)]); | ||
} | ||
@@ -291,2 +291,5 @@ }); | ||
}, | ||
focus(ref) { | ||
ReactDOM.findDOMNode(ref).focus(); | ||
}, | ||
renderChild (child, index) { | ||
@@ -293,0 +296,0 @@ return React.cloneElement(child, { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
39548
1106
0