diff options
author | shoaibbhimani <shoaibbhimani1392@gmail.com> | 2017-08-24 16:41:19 +0530 |
---|---|---|
committer | shoaibbhimani <shoaibbhimani1392@gmail.com> | 2017-08-24 16:41:19 +0530 |
commit | 0e4fd1626e460bd52a82de3f12f84d88f652dd7e (patch) | |
tree | 3cf72e1fa9efb52f0bb6486d962b2a6d70ff2447 /src/Panel.jsx | |
parent | 227e6ec28c733bba0a4b56e0583058489c0684a6 (diff) | |
download | time-picker-0e4fd1626e460bd52a82de3f12f84d88f652dd7e.tar.gz time-picker-0e4fd1626e460bd52a82de3f12f84d88f652dd7e.tar.zst time-picker-0e4fd1626e460bd52a82de3f12f84d88f652dd7e.zip |
Add keydown function on header input
Diffstat (limited to 'src/Panel.jsx')
-rw-r--r-- | src/Panel.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Panel.jsx b/src/Panel.jsx index 1953ad4..8a6c872 100644 --- a/src/Panel.jsx +++ b/src/Panel.jsx | |||
@@ -40,6 +40,7 @@ class Panel extends Component { | |||
40 | onClear: PropTypes.func, | 40 | onClear: PropTypes.func, |
41 | use12Hours: PropTypes.bool, | 41 | use12Hours: PropTypes.bool, |
42 | addon: PropTypes.func, | 42 | addon: PropTypes.func, |
43 | onKeyDown: PropTypes.func, | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | static defaultProps = { | 46 | static defaultProps = { |
@@ -52,6 +53,7 @@ class Panel extends Component { | |||
52 | defaultOpenValue: moment(), | 53 | defaultOpenValue: moment(), |
53 | use12Hours: false, | 54 | use12Hours: false, |
54 | addon: noop, | 55 | addon: noop, |
56 | onKeyDown: noop, | ||
55 | }; | 57 | }; |
56 | 58 | ||
57 | constructor(props) { | 59 | constructor(props) { |
@@ -89,7 +91,7 @@ class Panel extends Component { | |||
89 | const { | 91 | const { |
90 | prefixCls, className, placeholder, disabledHours, disabledMinutes, | 92 | prefixCls, className, placeholder, disabledHours, disabledMinutes, |
91 | disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond, | 93 | disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond, |
92 | format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear, | 94 | format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear, onKeyDown, |
93 | } = this.props; | 95 | } = this.props; |
94 | const { | 96 | const { |
95 | value, currentSelectPanel, | 97 | value, currentSelectPanel, |
@@ -122,6 +124,7 @@ class Panel extends Component { | |||
122 | onChange={this.onChange} | 124 | onChange={this.onChange} |
123 | onClear={onClear} | 125 | onClear={onClear} |
124 | allowEmpty={allowEmpty} | 126 | allowEmpty={allowEmpty} |
127 | onKeyDown={onKeyDown} | ||
125 | /> | 128 | /> |
126 | <Combobox | 129 | <Combobox |
127 | prefixCls={prefixCls} | 130 | prefixCls={prefixCls} |