improve code style

This commit is contained in:
afc163 2016-06-20 16:25:35 +08:00
parent 36aa621fa4
commit f5c60541f3
2 changed files with 11 additions and 5 deletions

View File

@ -566,7 +566,9 @@ export default class Table extends React.Component {
if (column.filters && column.filters.length > 0) {
let colFilters = this.state.filters[key] || [];
filterDropdown = (
<FilterDropdown locale={locale} column={column}
<FilterDropdown
locale={locale}
column={column}
selectedKeys={colFilters}
confirmFilter={this.handleFilter}
/>

View File

@ -108,7 +108,8 @@ export default class FilterMenu extends React.Component {
const menus = (
<div className="ant-table-filter-dropdown">
<Menu multiple={multiple}
<Menu
multiple={multiple}
onClick={this.handleMenuItemClick}
prefixCls="ant-dropdown-menu"
onSelect={this.setSelectedKeys}
@ -118,12 +119,14 @@ export default class FilterMenu extends React.Component {
{this.renderMenus(column.filters)}
</Menu>
<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}
>
{locale.filterConfirm}
</a>
<a className="ant-table-filter-dropdown-link clear"
<a
className="ant-table-filter-dropdown-link clear"
onClick={this.handleClearFilters}
>
{locale.filterReset}
@ -136,7 +139,8 @@ export default class FilterMenu extends React.Component {
? 'ant-table-filter-selected' : '';
return (
<Dropdown trigger={['click']}
<Dropdown
trigger={['click']}
overlay={menus}
visible={this.state.visible}
onVisibleChange={this.onVisibleChange}