From 3b367d3b4834a65ac9cd1fc86e2fef29f5d3d162 Mon Sep 17 00:00:00 2001 From: xzdry Date: Wed, 14 Sep 2022 11:36:16 +0800 Subject: [PATCH] fix(Table): illegal default current page is automatically fixed to 1 --- packages/arco-lib/src/components/Table/Table.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/arco-lib/src/components/Table/Table.tsx b/packages/arco-lib/src/components/Table/Table.tsx index 755d3876..581b60d9 100644 --- a/packages/arco-lib/src/components/Table/Table.tsx +++ b/packages/arco-lib/src/components/Table/Table.tsx @@ -220,7 +220,7 @@ export const Table = implementRuntimeComponent({ const currentChecked = useRef<(string | number)[]>([]); const [currentPage, setCurrentPage] = useStateValue( - defaultCurrent ?? 1, + !defaultCurrent || defaultCurrent < 1 ? 1 : defaultCurrent, mergeState, updateWhenDefaultPageChanges, 'currentPage'