Skip to content

Commit a6a4ac3

Browse files
committed
fix: update publish status on addition of child components to containers
1 parent cec074e commit a6a4ac3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/library-authoring/data/apiHooks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,8 @@ export const useAddItemsToContainer = (containerId?: string) => {
814814
// It would be complex to bring the entire hierarchy and only update the items within that hierarchy.
815815
queryClient.invalidateQueries({ queryKey: libraryAuthoringQueryKeys.containerHierarchy(undefined) });
816816
queryClient.invalidateQueries({ queryKey: xblockQueryKeys.componentHierarchy(undefined) });
817+
// Invalidate the container to update its publish status
818+
queryClient.invalidateQueries({ queryKey: libraryAuthoringQueryKeys.container(containerId) });
817819

818820
const containerType = getBlockType(containerId);
819821
if (containerType === 'section') {

0 commit comments

Comments
 (0)