mirror of
https://github.com/docmost/docmost.git
synced 2026-05-17 23:14:07 +08:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user