From 482336352fd3fb1b7db622ca63d14c5a90a00b5b Mon Sep 17 00:00:00 2001 From: Chason Ma Date: Fri, 29 Nov 2024 18:00:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20table-render=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=BB=98=E8=AE=A4=20current=20=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/table-render/src/core/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/table-render/src/core/index.tsx b/packages/table-render/src/core/index.tsx index 71882108b..7a773fc78 100644 --- a/packages/table-render/src/core/index.tsx +++ b/packages/table-render/src/core/index.tsx @@ -57,8 +57,13 @@ const RenderCore: React.FC = 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); }, []);