mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-04 08:59:40 +08:00
e7f5030f2b
* 修复AutoComplete组件allowClear属性的说明有歧义的问题 * fix: change Ok to OK * update jest snapshot Co-authored-by: chj_damon <chjdamon@gmail.com>
802 B
802 B
order | title | ||||
---|---|---|---|---|---|
6 |
|
zh-CN
在 TimePicker 选择框底部显示自定义的内容。
en-US
Render addon contents to time picker panel's bottom.
import { TimePicker, Button } from 'antd';
class TimePickerAddonDemo extends React.Component {
state = { open: false };
handleOpenChange = open => {
this.setState({ open });
};
handleClose = () => this.setState({ open: false });
render() {
return (
<TimePicker
open={this.state.open}
onOpenChange={this.handleOpenChange}
renderExtraFooter={() => (
<Button size="small" type="primary" onClick={this.handleClose}>
OK
</Button>
)}
/>
);
}
}
ReactDOM.render(<TimePickerAddonDemo />, mountNode);