提交 7f8cb838 编写于 作者: Z Zheeeng 提交者: niko

Remove the side effects in render method (#10357)

上级 0f779494
......@@ -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,
);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册