Skip to content

Commit b1561b5

Browse files
authored
Merge pull request #1582 from chasonma/patch-1
fix: 修复 table-render 配置默认 current 不生效
2 parents 4989419 + 4823363 commit b1561b5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/table-render/src/core/index.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@ const RenderCore: React.FC<TableRenderProps & { tableRef: any }> = props => {
5757
pagination
5858
};
5959

60-
if (typeof tableProps?.pagination === 'object' && tableProps?.pagination?.pageSize) {
61-
initState.pagination.pageSize = tableProps.pagination.pageSize;
60+
if (typeof tableProps?.pagination === 'object') {
61+
if (tableProps?.pagination?.current) {
62+
initState.pagination.current = tableProps.pagination.current;
63+
}
64+
if (tableProps?.pagination?.pageSize) {
65+
initState.pagination.pageSize = tableProps.pagination.pageSize;
66+
}
6267
}
6368
setState(initState);
6469
}, []);

0 commit comments

Comments
 (0)