mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 06:56:38 +00:00
Fix delete documents on mongo bug (#1852)
This commit is contained in:
parent
96ba0a9729
commit
495296602a
@ -845,8 +845,8 @@ export const DocumentsTabComponent: React.FunctionComponent<IDocumentsTabCompone
|
|||||||
_deleteDocuments(toDeleteDocumentIds)
|
_deleteDocuments(toDeleteDocumentIds)
|
||||||
.then(
|
.then(
|
||||||
(deletedIds: DocumentId[]) => {
|
(deletedIds: DocumentId[]) => {
|
||||||
const deletedRids = new Set(deletedIds.map((documentId) => documentId.rid));
|
const deletedIdsSet = new Set(deletedIds.map((documentId) => documentId.id));
|
||||||
const newDocumentIds = [...documentIds.filter((documentId) => !deletedRids.has(documentId.rid))];
|
const newDocumentIds = [...documentIds.filter((documentId) => !deletedIdsSet.has(documentId.id))];
|
||||||
setDocumentIds(newDocumentIds);
|
setDocumentIds(newDocumentIds);
|
||||||
|
|
||||||
setSelectedDocumentContent(undefined);
|
setSelectedDocumentContent(undefined);
|
||||||
|
Loading…
Reference in New Issue
Block a user