From 5fcf22e028bf878c5be854c19074480cadf8b4bc Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 8 Dec 2015 22:11:02 +0800 Subject: default select value at first position --- package.json | 2 +- src/module/Select.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 52d9fd7..118f08c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-time-picker", - "version": "1.0.0-alpha4", + "version": "1.0.0-alpha5", "description": "React TimePicker", "keywords": [ "react", diff --git a/src/module/Select.jsx b/src/module/Select.jsx index 0b91ac5..8cf4e2d 100644 --- a/src/module/Select.jsx +++ b/src/module/Select.jsx @@ -62,7 +62,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 - 1; + let index = this.props.selectedIndex; if (index < 0) { index = 0; } -- cgit v1.2.3