Skip to content

Commit 701e41b

Browse files
authored
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.
1 parent ac9faac commit 701e41b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/library-authoring/data/apiHooks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ export const useRestoreContainer = (containerId: string) => {
690690
return useMutation({
691691
mutationFn: async () => api.restoreContainer(containerId),
692692
onSettled: () => {
693+
queryClient.invalidateQueries({ queryKey: libraryAuthoringQueryKeys.contentLibrary(libraryId) });
693694
queryClient.invalidateQueries({ predicate: (query) => libraryQueryPredicate(query, libraryId) });
694695
},
695696
});

0 commit comments

Comments
 (0)