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({ queryClient.removeQueries({
predicate: ({ queryKey }) => { predicate: ({ queryKey }) => {
const [qType, qEntity] = queryKey; const [qType, qEntity, qId] = queryKey;
return ( return (
(qType === QueryType.collection && (qType === QueryType.collection &&
isSameEntity(qEntity, EntityType.BLOCK)) || isSameEntity(qEntity, EntityType.BLOCK) &&
isSameEntity(qEntity, EntityType.CATEGORY) qId === selectedCategoryId) ||
(isSameEntity(qEntity, EntityType.CATEGORY) &&
qId === selectedCategoryId)
); );
}, },
}); });