fix(table): delete item doesn't refresh the table [BE-11064] (#12060)

pull/12070/head
Oscar Zhou 2024-07-31 20:39:06 +12:00 committed by GitHub
parent ef8e611e0a
commit a63bd2cea4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 6 deletions

View File

@ -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