fix: improve sidebar page tree syncing (#407)

* sync node deletion

* tree sync improvements

* fix cache bug

* fix debounced page title

* fix
This commit is contained in:
Philip Okugbe
2024-10-26 15:48:40 +01:00
committed by GitHub
parent b57be9c736
commit 978fadd6b9
7 changed files with 163 additions and 50 deletions
@@ -30,10 +30,13 @@ export const useQuerySubscription = () => {
queryKeyId = data.id;
}
queryClient.setQueryData([...data.entity, queryKeyId], {
...queryClient.getQueryData([...data.entity, queryKeyId]),
...data.payload,
});
// only update if data was already in cache
if(queryClient.getQueryData([...data.entity, queryKeyId])){
queryClient.setQueryData([...data.entity, queryKeyId], {
...queryClient.getQueryData([...data.entity, queryKeyId]),
...data.payload,
});
}
/*
queryClient.setQueriesData(