diff options
Diffstat (limited to 'src/Header.jsx')
-rw-r--r-- | src/Header.jsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Header.jsx b/src/Header.jsx index 6bed557..1520d25 100644 --- a/src/Header.jsx +++ b/src/Header.jsx | |||
@@ -23,6 +23,7 @@ class Header extends Component { | |||
23 | defaultOpenValue: PropTypes.object, | 23 | defaultOpenValue: PropTypes.object, |
24 | currentSelectPanel: PropTypes.string, | 24 | currentSelectPanel: PropTypes.string, |
25 | focusOnOpen: PropTypes.bool, | 25 | focusOnOpen: PropTypes.bool, |
26 | onKeyDown: PropTypes.func, | ||
26 | }; | 27 | }; |
27 | 28 | ||
28 | constructor(props) { | 29 | constructor(props) { |
@@ -134,9 +135,12 @@ class Header extends Component { | |||
134 | } | 135 | } |
135 | 136 | ||
136 | onKeyDown = (e) => { | 137 | onKeyDown = (e) => { |
138 | const { onEsc, onKeyDown } = this.props; | ||
137 | if (e.keyCode === 27) { | 139 | if (e.keyCode === 27) { |
138 | this.props.onEsc(); | 140 | onEsc(); |
139 | } | 141 | } |
142 | |||
143 | onKeyDown(e); | ||
140 | } | 144 | } |
141 | 145 | ||
142 | onClear = () => { | 146 | onClear = () => { |