aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Header.jsx
diff options
context:
space:
mode:
author偏右 <afc163@gmail.com>2017-10-22 16:25:33 +0800
committerGitHub <noreply@github.com>2017-10-22 16:25:33 +0800
commitcc2dca8a2bb0bf3b820903043be2586fb413c458 (patch)
tree4e0621e9b18f7938ffc31b87263182c79793d581 /src/Header.jsx
parent5827568ef882ae5a474f37ff5c843e931528ebe8 (diff)
parentb6767d8a08ccfc52836e09e3a0886a5cf225b93f (diff)
downloadtime-picker-cc2dca8a2bb0bf3b820903043be2586fb413c458.tar.gz
time-picker-cc2dca8a2bb0bf3b820903043be2586fb413c458.tar.zst
time-picker-cc2dca8a2bb0bf3b820903043be2586fb413c458.zip
Merge branch 'master' into picker-step
Diffstat (limited to 'src/Header.jsx')
-rw-r--r--src/Header.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Header.jsx b/src/Header.jsx
index 91e8549..f6dd241 100644
--- a/src/Header.jsx
+++ b/src/Header.jsx
@@ -22,6 +22,7 @@ class Header extends Component {
22 allowEmpty: PropTypes.bool, 22 allowEmpty: PropTypes.bool,
23 defaultOpenValue: PropTypes.object, 23 defaultOpenValue: PropTypes.object,
24 currentSelectPanel: PropTypes.string, 24 currentSelectPanel: PropTypes.string,
25 onKeyDown: PropTypes.func,
25 }; 26 };
26 27
27 constructor(props) { 28 constructor(props) {
@@ -122,9 +123,12 @@ class Header extends Component {
122 } 123 }
123 124
124 onKeyDown = (e) => { 125 onKeyDown = (e) => {
126 const { onEsc, onKeyDown } = this.props;
125 if (e.keyCode === 27) { 127 if (e.keyCode === 27) {
126 this.props.onEsc(); 128 onEsc();
127 } 129 }
130
131 onKeyDown(e);
128 } 132 }
129 133
130 onClear = () => { 134 onClear = () => {