mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 20:49:14 +08:00
improve code style
This commit is contained in:
parent
36aa621fa4
commit
f5c60541f3
@ -566,7 +566,9 @@ export default class Table extends React.Component {
|
|||||||
if (column.filters && column.filters.length > 0) {
|
if (column.filters && column.filters.length > 0) {
|
||||||
let colFilters = this.state.filters[key] || [];
|
let colFilters = this.state.filters[key] || [];
|
||||||
filterDropdown = (
|
filterDropdown = (
|
||||||
<FilterDropdown locale={locale} column={column}
|
<FilterDropdown
|
||||||
|
locale={locale}
|
||||||
|
column={column}
|
||||||
selectedKeys={colFilters}
|
selectedKeys={colFilters}
|
||||||
confirmFilter={this.handleFilter}
|
confirmFilter={this.handleFilter}
|
||||||
/>
|
/>
|
||||||
|
@ -108,7 +108,8 @@ export default class FilterMenu extends React.Component {
|
|||||||
|
|
||||||
const menus = (
|
const menus = (
|
||||||
<div className="ant-table-filter-dropdown">
|
<div className="ant-table-filter-dropdown">
|
||||||
<Menu multiple={multiple}
|
<Menu
|
||||||
|
multiple={multiple}
|
||||||
onClick={this.handleMenuItemClick}
|
onClick={this.handleMenuItemClick}
|
||||||
prefixCls="ant-dropdown-menu"
|
prefixCls="ant-dropdown-menu"
|
||||||
onSelect={this.setSelectedKeys}
|
onSelect={this.setSelectedKeys}
|
||||||
@ -118,12 +119,14 @@ export default class FilterMenu extends React.Component {
|
|||||||
{this.renderMenus(column.filters)}
|
{this.renderMenus(column.filters)}
|
||||||
</Menu>
|
</Menu>
|
||||||
<div className="ant-table-filter-dropdown-btns">
|
<div className="ant-table-filter-dropdown-btns">
|
||||||
<a className="ant-table-filter-dropdown-link confirm"
|
<a
|
||||||
|
className="ant-table-filter-dropdown-link confirm"
|
||||||
onClick={this.handleConfirm}
|
onClick={this.handleConfirm}
|
||||||
>
|
>
|
||||||
{locale.filterConfirm}
|
{locale.filterConfirm}
|
||||||
</a>
|
</a>
|
||||||
<a className="ant-table-filter-dropdown-link clear"
|
<a
|
||||||
|
className="ant-table-filter-dropdown-link clear"
|
||||||
onClick={this.handleClearFilters}
|
onClick={this.handleClearFilters}
|
||||||
>
|
>
|
||||||
{locale.filterReset}
|
{locale.filterReset}
|
||||||
@ -136,7 +139,8 @@ export default class FilterMenu extends React.Component {
|
|||||||
? 'ant-table-filter-selected' : '';
|
? 'ant-table-filter-selected' : '';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown trigger={['click']}
|
<Dropdown
|
||||||
|
trigger={['click']}
|
||||||
overlay={menus}
|
overlay={menus}
|
||||||
visible={this.state.visible}
|
visible={this.state.visible}
|
||||||
onVisibleChange={this.onVisibleChange}
|
onVisibleChange={this.onVisibleChange}
|
||||||
|
Loading…
Reference in New Issue
Block a user