From 44e5809cc01a7b9d735d70bd4bbd1708f157c393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=9C=9D=E4=BF=8A?= Date: Wed, 22 Nov 2023 17:14:46 +0800 Subject: [PATCH] PullRequest: 241 fix: sensitiveColumn's table batchDelete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge branch 'fix/dev-4.2.2-sensitiveColumnBatchDelete of git@code.alipay.com:oceanbase/oceanbase-developer-center.git into dev-4.2.2 https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/241 Signed-off-by: 晓康 * fix: sensitiveColumn's table batchDelete --- .../Sensitive/components/SensitiveColumn/index.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/page/Project/Sensitive/components/SensitiveColumn/index.tsx b/src/page/Project/Sensitive/components/SensitiveColumn/index.tsx index fc31dd110..144eca9d8 100644 --- a/src/page/Project/Sensitive/components/SensitiveColumn/index.tsx +++ b/src/page/Project/Sensitive/components/SensitiveColumn/index.tsx @@ -482,8 +482,15 @@ const SensitiveColumn = ({ }), //删除失败 ); } - - tableRef.current?.reload?.(); + const { page } = sensitiveColumn; + const newCurrent = Math.ceil((page?.totalElements - ids?.length) / page?.size); + tableRef.current?.reload?.({ + pagination: { + current: newCurrent >= page?.number ? page?.number : newCurrent, + pageSize: page?.size, + }, + pageSize: page?.size, + }); tableRef.current?.resetSelectedRows(); setSubmiting(false); }