We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91ab1c1 commit 073b534Copy full SHA for 073b534
1 file changed
src/course-outline/data/apiHooks.ts
@@ -128,6 +128,9 @@ export const useCreateCourseBlock = (
128
queryKey: courseOutlineQueryKeys.courseDetails(getCourseKey(data.locator)),
129
});
130
await invalidateParentQueries(queryClient, variables);
131
+ // Invalidate tags count for the newly created block
132
+ const contentPattern = data.locator.replace(/\+type@.*$/, '*');
133
+ queryClient.invalidateQueries({ queryKey: ['contentTagsCount', contentPattern] });
134
// scroll to newly added block
135
setData({ id: data.locator });
136
// if newly created block is chapter or section, fetch and add it to store
0 commit comments