From 495296602adc441f38c19325d74dc6a53260a78f Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Mon, 3 Jun 2024 15:23:09 +0200 Subject: [PATCH] Fix delete documents on mongo bug (#1852) --- src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx index 4a78919db..35c3f8221 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx @@ -845,8 +845,8 @@ export const DocumentsTabComponent: React.FunctionComponent { - const deletedRids = new Set(deletedIds.map((documentId) => documentId.rid)); - const newDocumentIds = [...documentIds.filter((documentId) => !deletedRids.has(documentId.rid))]; + const deletedIdsSet = new Set(deletedIds.map((documentId) => documentId.id)); + const newDocumentIds = [...documentIds.filter((documentId) => !deletedIdsSet.has(documentId.id))]; setDocumentIds(newDocumentIds); setSelectedDocumentContent(undefined);