fix: invalidate library queries on restore container (#2231)
Restoring containers should invalidate queries in the library to show the deleted component without needing to refresh.
This commit is contained in:
@@ -690,6 +690,7 @@ export const useRestoreContainer = (containerId: string) => {
|
||||
return useMutation({
|
||||
mutationFn: async () => api.restoreContainer(containerId),
|
||||
onSettled: () => {
|
||||
queryClient.invalidateQueries({ queryKey: libraryAuthoringQueryKeys.contentLibrary(libraryId) });
|
||||
queryClient.invalidateQueries({ predicate: (query) => libraryQueryPredicate(query, libraryId) });
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user