allowEmpty: PropTypes.bool,
defaultOpenValue: PropTypes.object,
currentSelectPanel: PropTypes.string,
+ onKeyDown: PropTypes.func,
};
constructor(props) {
}
onKeyDown = (e) => {
+ const { onEsc, onKeyDown } = this.props;
if (e.keyCode === 27) {
- this.props.onEsc();
+ onEsc();
}
+
+ onKeyDown(e);
}
onClear = () => {
onClear: PropTypes.func,
use12Hours: PropTypes.bool,
addon: PropTypes.func,
+ onKeyDown: PropTypes.func,
};
static defaultProps = {
defaultOpenValue: moment(),
use12Hours: false,
addon: noop,
+ onKeyDown: noop,
};
constructor(props) {
const {
prefixCls, className, placeholder, disabledHours, disabledMinutes,
disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond,
- format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear,
+ format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear, onKeyDown,
} = this.props;
const {
value, currentSelectPanel,
onChange={this.onChange}
onClear={onClear}
allowEmpty={allowEmpty}
+ onKeyDown={onKeyDown}
/>
<Combobox
prefixCls={prefixCls}
name: PropTypes.string,
autoComplete: PropTypes.string,
use12Hours: PropTypes.bool,
+ onKeyDown: PropTypes.func,
};
static defaultProps = {
onClose: noop,
addon: noop,
use12Hours: false,
+ onKeyDown: noop,
};
constructor(props) {
prefixCls, placeholder, disabledHours,
disabledMinutes, disabledSeconds, hideDisabledOptions,
allowEmpty, showHour, showMinute, showSecond, defaultOpenValue, clearText,
- addon, use12Hours,
+ addon, use12Hours, onKeyDown,
} = this.props;
return (
<Panel
hideDisabledOptions={hideDisabledOptions}
use12Hours={use12Hours}
addon={addon}
+ onKeyDown={onKeyDown}
/>
);
}