From 2414dbb5f83fab6408644992f4073e8f988a0bb7 Mon Sep 17 00:00:00 2001 From: twwu Date: Mon, 23 Jun 2025 16:38:19 +0800 Subject: [PATCH] feat: clear selected IDs on document deletion action in DocumentList component --- web/app/components/datasets/documents/list.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/app/components/datasets/documents/list.tsx b/web/app/components/datasets/documents/list.tsx index cebf89e1c5..1c30c125c1 100644 --- a/web/app/components/datasets/documents/list.tsx +++ b/web/app/components/datasets/documents/list.tsx @@ -166,6 +166,8 @@ const DocumentList: FC = ({ const [e] = await asyncRunSafe(opApi({ datasetId, documentIds: selectedIds }) as Promise) if (!e) { + if (actionName === DocumentActionType.delete) + onSelectedIdChange([]) Toast.notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') }) onUpdate() }