Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove reundant invalidation
  • Loading branch information
getdave committed Dec 16, 2025
commit b12671a89c69835f878a84affa83637099439ad3
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function OverlayTemplatePartSelector( {
per_page: -1,
} );

const { saveEntityRecord, invalidateResolution } = useDispatch( coreStore );
const { saveEntityRecord } = useDispatch( coreStore );
const { createErrorNotice } = useDispatch( noticesStore );

// Track if we're currently creating a new overlay
Expand Down Expand Up @@ -156,15 +156,8 @@ export default function OverlayTemplatePartSelector( {
{ throwOnError: true }
);

// Invalidate the template parts resolution cache to refresh the list
invalidateResolution( 'getEntityRecords', [
'postType',
'wp_template_part',
{ per_page: -1 },
] );

return templatePart;
}, [ overlayTemplateParts, saveEntityRecord, invalidateResolution ] );
}, [ overlayTemplateParts, saveEntityRecord ] );

const handleCreateOverlay = useCallback( async () => {
Comment thread
jeryj marked this conversation as resolved.
try {
Expand Down