Fix table radius without column header, close #4373

This commit is contained in:
afc163 2016-12-27 18:24:30 +08:00
parent e91f4f2335
commit 668c481110
2 changed files with 9 additions and 1 deletions

View File

@ -823,7 +823,7 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
}
render() {
const { style, className, prefixCls, ...restProps } = this.props;
const { style, className, prefixCls, showHeader, ...restProps } = this.props;
const data = this.getCurrentPageData();
let columns = this.renderRowSelection();
const expandIconAsCell = this.props.expandedRowRender && this.props.expandIconAsCell !== false;
@ -833,6 +833,7 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
[`${prefixCls}-${this.props.size}`]: true,
[`${prefixCls}-bordered`]: this.props.bordered,
[`${prefixCls}-empty`]: !data.length,
[`${prefixCls}-without-column-header`]: !showHeader,
});
columns = this.renderColumnsDropdown(columns);
@ -853,6 +854,7 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
prefixCls={prefixCls}
data={data}
columns={columns}
showHeader={showHeader}
className={classString}
expandIconColumnIndex={expandIconColumnIndex}
expandIconAsCell={expandIconAsCell}

View File

@ -111,6 +111,12 @@
}
}
// https://github.com/ant-design/ant-design/issues/4373
&-without-column-header &-title + &-content,
&-without-column-header table {
border-radius: 0;
}
&-tbody > tr.@{table-prefix-cls}-row-selected {
background: #fafafa;
}