Add custom local support in pagination component.

This commit is contained in:
涌谷(刘旭恒) 2018-06-21 12:00:09 +08:00 committed by 偏右
parent 009ed08580
commit babbbdd4e5

View File

@ -41,8 +41,9 @@ export default class Pagination extends React.Component<PaginationProps, {}> {
selectPrefixCls: 'ant-select',
};
renderPagination = (locale: PaginationLocale) => {
const { className, size, ...restProps } = this.props;
renderPagination = (contextLocale: PaginationLocale) => {
const { className, size, locale: customLocale, ...restProps } = this.props;
const locale = { ...contextLocale, ...customLocale };
const isSmall = size === 'small';
return (
<RcPagination