X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FTimePicker.jsx;h=4d7d4d6c7416c2953711abd6a8b054273de45b7a;hb=73fb171157dd0eb56a92d57cf20ddaf937e9b607;hp=7d2395d3558d255c7fc966acd9a12b2efb8da669;hpb=bb87d05e6372596c8e8e1f2ebf657df6b9a8d826;p=github%2Ffretlink%2Ftime-picker.git diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index 7d2395d..4d7d4d6 100644 --- a/src/TimePicker.jsx +++ b/src/TimePicker.jsx @@ -107,7 +107,7 @@ const Picker = React.createClass({ onEsc() { this.setOpen(false); - this.picker.focus(); + this.focus(); }, onKeyDown(e) { @@ -186,12 +186,15 @@ const Picker = React.createClass({ } }, + focus() { + this.picker.focus(); + }, + render() { const { prefixCls, placeholder, placement, align, disabled, transitionName, style, className, showHour, - showMinute, showSecond, getPopupContainer, name, - showSecond, getPopupContainer, autoComplete, + showMinute, showSecond, getPopupContainer, name, autoComplete, } = this.props; const { open, value } = this.state; let popupClassName;