From ed8496061a1535fb82503d9723a6014a85ee7625 Mon Sep 17 00:00:00 2001
From: Benjy Cui <benjytrys@gmail.com>
Date: Fri, 10 Feb 2017 17:57:46 +0800
Subject: feat: support .focus

---
 src/TimePicker.jsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/TimePicker.jsx')

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({
 
   onEsc() {
     this.setOpen(false);
-    this.refs.picker.focus();
+    this.focus();
   },
 
   onKeyDown(e) {
@@ -183,6 +183,10 @@ const Picker = React.createClass({
     }
   },
 
+  focus() {
+    this.refs.picker.focus();
+  },
+
   render() {
     const {
       prefixCls, placeholder, placement, align,
-- 
cgit v1.2.3

