From 0d6f256ccd9f4ab08a9b35824cf93e13a2117cb7 Mon Sep 17 00:00:00 2001 From: Jovan Ssebaggala Date: Thu, 20 Jun 2024 15:59:04 +0300 Subject: [PATCH] refresh encounter list after deleting encounter --- .../components/encounter-list/encounter-list.component.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx b/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx index a849aa717..3a8b3d053 100644 --- a/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx +++ b/packages/esm-commons-lib/src/components/encounter-list/encounter-list.component.tsx @@ -104,12 +104,7 @@ export const EncounterList: React.FC = ({ const abortController = new AbortController(); deleteEncounter(encounterUuid, abortController) .then(() => { - mutate( - (key) => - typeof key === "string" && key.startsWith("/ws/rest/v1/encounter"), - undefined, - { revalidate: true } - ); + onFormSave(); showSnackbar({ isLowContrast: true, title: t('encounterDeleted', 'Encounter deleted'),