Skip to content

Commit 073b534

Browse files
committed
fix: Show tag button adding containers with tags from library
1 parent 91ab1c1 commit 073b534

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/course-outline/data/apiHooks.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ export const useCreateCourseBlock = (
128128
queryKey: courseOutlineQueryKeys.courseDetails(getCourseKey(data.locator)),
129129
});
130130
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] });
131134
// scroll to newly added block
132135
setData({ id: data.locator });
133136
// if newly created block is chapter or section, fetch and add it to store

0 commit comments

Comments
 (0)