]> git.immae.eu Git - github/fretlink/time-picker.git/commitdiff
Change current select item to second place
authorafc163 <afc163@gmail.com>
Sat, 28 Nov 2015 07:34:39 +0000 (15:34 +0800)
committerafc163 <afc163@gmail.com>
Sat, 28 Nov 2015 07:34:39 +0000 (15:34 +0800)
src/module/Select.jsx

index be4c02544eb53b2bf2e37405868310f35388edc1..570ff371c3f457e2a2dd5b2057a2c6d433101823 100644 (file)
@@ -58,7 +58,7 @@ const Select = React.createClass({
     // move to selected item
     const select = ReactDom.findDOMNode(this);
     const list = ReactDom.findDOMNode(this.refs.list);
-    let index = this.props.selectedIndex - 2;
+    let index = this.props.selectedIndex - 1;
     if (index < 0) {
       index = 0;
     }