Pass className to table's pagination

fix #6416
This commit is contained in:
Wei Zhu 2017-06-12 11:35:29 +08:00
parent 0bea0f6482
commit baa8e23280
3 changed files with 4 additions and 3 deletions

View File

@ -781,7 +781,7 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
<Pagination
key="pagination"
{...pagination}
className={`${this.props.prefixCls}-pagination`}
className={classNames(pagination.className, `${this.props.prefixCls}-pagination`)}
onChange={this.handlePageChange}
total={total}
size={size}

View File

@ -15,7 +15,7 @@ describe('Table.pagination', () => {
{ key: 3, name: 'Jerry' },
];
const pagination = { pageSize: 2 };
const pagination = { className: 'my-page', pageSize: 2 };
function createTable(props) {
return (
@ -66,6 +66,7 @@ describe('Table.pagination', () => {
expect(handleChange).toBeCalledWith(
{
className: 'my-page',
current: 2,
pageSize: 2,
},

View File

@ -73,7 +73,7 @@ exports[`Table.pagination renders pagination correctly 1`] = `
</div>
</div>
<ul
class="ant-pagination ant-table-pagination"
class="ant-pagination my-page ant-table-pagination"
unselectable="unselectable"
>
<li