From a63bd2cea48e8217973c8c47ec7f8eb47629f2fb Mon Sep 17 00:00:00 2001 From: Oscar Zhou <100548325+oscarzhou-portainer@users.noreply.github.com> Date: Wed, 31 Jul 2024 20:39:06 +1200 Subject: [PATCH] fix(table): delete item doesn't refresh the table [BE-11064] (#12060) --- app/react-tools/react-query.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/react-tools/react-query.ts b/app/react-tools/react-query.ts index d4e1482d0..1e9ae125b 100644 --- a/app/react-tools/react-query.ts +++ b/app/react-tools/react-query.ts @@ -37,12 +37,7 @@ export function withInvalidate( return { onSuccess() { const promise = Promise.all( - queryKeysToInvalidate.map((keys) => - queryClient.invalidateQueries(keys, { - refetchActive: false, - refetchInactive: false, - }) - ) + queryKeysToInvalidate.map((keys) => queryClient.invalidateQueries(keys)) ); return skipRefresh ? undefined // don't wait for queries to refresh before setting state to success