mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
Remove the side effects in render method (#10357)
This commit is contained in:
parent
0f7794946f
commit
7f8cb838e3
@ -196,9 +196,12 @@ export default class List extends React.Component<ListProps> {
|
||||
[`${prefixCls}-something-after-last-item`]: this.isSomethingAfterLastItem(),
|
||||
});
|
||||
|
||||
this.defaultPaginationProps.total = dataSource.length;
|
||||
this.defaultPaginationProps.current = paginationCurrent;
|
||||
const paginationProps = { ...this.defaultPaginationProps, ...pagination };
|
||||
const paginationProps = {
|
||||
...this.defaultPaginationProps,
|
||||
total: dataSource.length,
|
||||
current: paginationCurrent,
|
||||
...pagination,
|
||||
};
|
||||
const largestPage = Math.ceil(
|
||||
paginationProps.total / paginationProps.pageSize,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user