fix: predicate

This commit is contained in:
hexastack 2024-11-01 10:35:06 +01:00
parent 310d9e47aa
commit 9a4aa004d2

View File

@ -475,12 +475,14 @@ const Diagrams = () => {
queryClient.removeQueries({
predicate: ({ queryKey }) => {
const [qType, qEntity] = queryKey;
const [qType, qEntity, qId] = queryKey;
return (
(qType === QueryType.collection &&
isSameEntity(qEntity, EntityType.BLOCK)) ||
isSameEntity(qEntity, EntityType.CATEGORY)
isSameEntity(qEntity, EntityType.BLOCK) &&
qId === selectedCategoryId) ||
(isSameEntity(qEntity, EntityType.CATEGORY) &&
qId === selectedCategoryId)
);
},
});