Skip to content

Commit

Permalink
fix: 修复 table-render 配置默认 current 不生效
Browse files Browse the repository at this point in the history
  • Loading branch information
chasonma authored Nov 29, 2024
1 parent b77b34d commit 4823363
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/table-render/src/core/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ const RenderCore: React.FC<TableRenderProps & { tableRef: any }> = props => {
pagination
};

if (typeof tableProps?.pagination === 'object' && tableProps?.pagination?.pageSize) {
initState.pagination.pageSize = tableProps.pagination.pageSize;
if (typeof tableProps?.pagination === 'object') {
if (tableProps?.pagination?.current) {
initState.pagination.current = tableProps.pagination.current;
}
if (tableProps?.pagination?.pageSize) {
initState.pagination.pageSize = tableProps.pagination.pageSize;
}
}
setState(initState);
}, []);
Expand Down

0 comments on commit 4823363

Please sign in to comment.