aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/TimePicker.jsx
diff options
context:
space:
mode:
authorBenjy Cui <benjytrys@gmail.com>2017-02-10 17:57:46 +0800
committerBenjy Cui <benjytrys@gmail.com>2017-02-10 17:57:46 +0800
commited8496061a1535fb82503d9723a6014a85ee7625 (patch)
tree5dbcfdfbcc1311ce657a58d8f43c0da70c845ff7 /src/TimePicker.jsx
parent74b83c4ad0b380a3a82c569c19267491af408684 (diff)
downloadtime-picker-ed8496061a1535fb82503d9723a6014a85ee7625.tar.gz
time-picker-ed8496061a1535fb82503d9723a6014a85ee7625.tar.zst
time-picker-ed8496061a1535fb82503d9723a6014a85ee7625.zip
feat: support .focus
Diffstat (limited to 'src/TimePicker.jsx')
-rw-r--r--src/TimePicker.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx
index ec3eda0..01bab2c 100644
--- a/src/TimePicker.jsx
+++ b/src/TimePicker.jsx
@@ -104,7 +104,7 @@ const Picker = React.createClass({
104 104
105 onEsc() { 105 onEsc() {
106 this.setOpen(false); 106 this.setOpen(false);
107 this.refs.picker.focus(); 107 this.focus();
108 }, 108 },
109 109
110 onKeyDown(e) { 110 onKeyDown(e) {
@@ -183,6 +183,10 @@ const Picker = React.createClass({
183 } 183 }
184 }, 184 },
185 185
186 focus() {
187 this.refs.picker.focus();
188 },
189
186 render() { 190 render() {
187 const { 191 const {
188 prefixCls, placeholder, placement, align, 192 prefixCls, placeholder, placement, align,