diff options
author | afc163 <afc163@gmail.com> | 2017-04-21 10:39:26 +0800 |
---|---|---|
committer | afc163 <afc163@gmail.com> | 2017-04-21 10:40:06 +0800 |
commit | 9b7808040c6cfdf6df60fffe10c86bb2a681cd9e (patch) | |
tree | 3bdf8aabdec7f65a49104618b03742c3f466d987 | |
parent | ff8894f38a556293c5dda5c027154237959839d3 (diff) | |
download | time-picker-9b7808040c6cfdf6df60fffe10c86bb2a681cd9e.tar.gz time-picker-9b7808040c6cfdf6df60fffe10c86bb2a681cd9e.tar.zst time-picker-9b7808040c6cfdf6df60fffe10c86bb2a681cd9e.zip |
Fix panel.close2.3.5
close ant-design/ant-design#5829
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/Panel.jsx | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/package.json b/package.json index 7edbf6a..fa956bf 100644 --- a/package.json +++ b/package.json | |||
@@ -1,6 +1,6 @@ | |||
1 | { | 1 | { |
2 | "name": "rc-time-picker", | 2 | "name": "rc-time-picker", |
3 | "version": "2.3.4", | 3 | "version": "2.3.5", |
4 | "description": "React TimePicker", | 4 | "description": "React TimePicker", |
5 | "keywords": [ | 5 | "keywords": [ |
6 | "react", | 6 | "react", |
diff --git a/src/Panel.jsx b/src/Panel.jsx index 65832ea..1953ad4 100644 --- a/src/Panel.jsx +++ b/src/Panel.jsx | |||
@@ -80,6 +80,11 @@ class Panel extends Component { | |||
80 | this.setState({ currentSelectPanel }); | 80 | this.setState({ currentSelectPanel }); |
81 | } | 81 | } |
82 | 82 | ||
83 | // https://github.com/ant-design/ant-design/issues/5829 | ||
84 | close() { | ||
85 | this.props.onEsc(); | ||
86 | } | ||
87 | |||
83 | render() { | 88 | render() { |
84 | const { | 89 | const { |
85 | prefixCls, className, placeholder, disabledHours, disabledMinutes, | 90 | prefixCls, className, placeholder, disabledHours, disabledMinutes, |