aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/TimePicker.jsx
diff options
context:
space:
mode:
author偏右 <afc163@gmail.com>2017-02-20 16:03:58 +0800
committerGitHub <noreply@github.com>2017-02-20 16:03:58 +0800
commit2f8835c7ed1457c9e9f80556ed001cba87c1c6a9 (patch)
treed4d7f3cb8ad22cfed3a5f39408a4953b9844bf4c /src/TimePicker.jsx
parent46e5fd60344c4fa718117e82153773ab0d15ebfc (diff)
parentdd63e6e7fa1d600d3656a4edbe5f5fc5410f443a (diff)
downloadtime-picker-2f8835c7ed1457c9e9f80556ed001cba87c1c6a9.tar.gz
time-picker-2f8835c7ed1457c9e9f80556ed001cba87c1c6a9.tar.zst
time-picker-2f8835c7ed1457c9e9f80556ed001cba87c1c6a9.zip
Merge pull request #31 from react-component/feat-focus
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 da47ac4..aa3e0da 100644
--- a/src/TimePicker.jsx
+++ b/src/TimePicker.jsx
@@ -106,7 +106,7 @@ const Picker = React.createClass({
106 106
107 onEsc() { 107 onEsc() {
108 this.setOpen(false); 108 this.setOpen(false);
109 this.picker.focus(); 109 this.focus();
110 }, 110 },
111 111
112 onKeyDown(e) { 112 onKeyDown(e) {
@@ -185,6 +185,10 @@ const Picker = React.createClass({
185 } 185 }
186 }, 186 },
187 187
188 focus() {
189 this.picker.focus();
190 },
191
188 render() { 192 render() {
189 const { 193 const {
190 prefixCls, placeholder, placement, align, 194 prefixCls, placeholder, placement, align,