import React, { Component } from 'react'; import { Table, Input, Button, Icon, DatePicker } from 'antd'; import moment from 'moment'; import Highlighter from 'react-highlight-words'; export default class RpoliceRecord extends Component { constructor(props) { super(props); this.state = { searchText: '', } } render() { // 添加搜索 this.getColumnSearchProps = (dataIndex, title) => ({ filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters }) => ( <div style={{ padding: 8 }}> <Input ref={node => { this.searchInput = node; }} placeholder={`搜索 ${title}`} value={selectedKeys[0]} onChange={e => setSelectedKeys(e.target.value "primary" onClick={() => this.handleSearch(selectedKeys, confirm)} icon="search" size="small" style={{ width: 90, marginRight: 8 }}> 搜索 </Button> <Button onClick={() => this.handleReset(clearFilters)} size="small" style={{ width: 90 }}>重置</Button> </div> ), filterIcon: filtered => ( <Icon type="search" style={{ color: filtered "primary" onClick={() => this.handleSearchtime(moment(selectedKeys[0]._d).format('YYYY-MM-DD'), confirm)} icon="search" size="small" style={{ width: 90, marginRight: 8 }}> 搜索 </Button> <Button onClick={() => this.handleReset(clearFilters)} size="small" style={{ width: 90 }}>重置</Button> </div> ), filterIcon: filtered => ( <Icon type="search" style={{ color: filtered "accidentTable" columns={columns} dataSource={data} bordered size="small" /> ) } }
总结
以上所述是小编给大家介绍的antd通过 filterDropdown 自定义按某天时间搜索功能,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
金钱帮资源网 Copyright www.kbjia.com
暂无“antd通过 filterDropdown 自定义按某天时间搜索功能”评论...
更新日志
2024年06月14日
2024年06月14日
- 邓丽君《黄金唱片》DSD+SBM版[WAV+CUE][470MB]
- 陈百强《感恩有你》DSD+SBM版[WAV+CUE][560MB]
- 世界启元光秀强度怎么样 光秀属性面板解析
- 世界启元古希腊文明怎么样 古希腊文明选择推荐
- 世界启元法兰西文明怎么样 法兰西文明选择推荐
- 群星《极度深情3CD》[WAV分轨]
- 群星《极品HIFI·女声情烧30首HQCD》2CD[WAV]
- 闽南语发烧音乐至尊典藏-《迷醉的歌声·声声醉》[WAV】
- 悔悟了?IGN法国为《黑神话》争议言论正式致歉
- Xbox发布会汇总:战争机器、毁灭战士新作亮相!
- IGN法国无知发言开团《黑神话》:金箍棒不是棉签
- 群星.2002-欢庆迪斯尼100周年3CD【滚石】【WAV+CUE】
- DRY.1998-TWO【正东】【WAV+CUE】
- 马常胜.2012-油菜花开的季节【风潮】【WAV+CUE】
- 世界启元光秀命运羁绊怎么样 光秀命运羁绊介绍