mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
Fix table radius without column header, close #4373
This commit is contained in:
parent
e91f4f2335
commit
668c481110
@ -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}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user