diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 529ac3274b..a743fa46d8 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -39,6 +39,12 @@ const defaultPagination = { onShowSizeChange: noop, }; +/** + * Avoid creating new object, so that parent component's shouldComponentUpdate + * can works appropriately。 + */ +const emptyObject = {}; + export type TableColumnConfig = ColumnProps; export interface TableRowSelection { @@ -210,7 +216,7 @@ export default class Table extends React.Component, any> { const newPagination = assign({}, defaultPagination, previousState.pagination, nextProps.pagination); newPagination.current = newPagination.current || 1; newPagination.pageSize = newPagination.pageSize || 10; - return { pagination: nextProps.pagination !== false ? newPagination : {} }; + return { pagination: nextProps.pagination !== false ? newPagination : emptyObject }; }); } if (nextProps.rowSelection &&