mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: added the invalidateQueries instead of removeQueries
This commit is contained in:
parent
c773625dd6
commit
dc088018d2
@ -56,14 +56,13 @@ export const useDelete = <
|
||||
|
||||
// Invalidate all counts & collections
|
||||
if (invalidate) {
|
||||
queryClient.removeQueries({
|
||||
queryClient.invalidateQueries({
|
||||
predicate: ({ queryKey }) => {
|
||||
const [qType, qEntity, qId] = queryKey;
|
||||
const [qType, qEntity] = queryKey;
|
||||
|
||||
return (
|
||||
(qType === QueryType.count || qType === QueryType.collection) &&
|
||||
isSameEntity(qEntity, entity) &&
|
||||
qId === id
|
||||
isSameEntity(qEntity, entity)
|
||||
);
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user