Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Navigation Link block constantly updating its inner block list settings #30274

Merged
merged 1 commit into from
Mar 27, 2021
Merged
Changes from all commits
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
4 changes: 3 additions & 1 deletion packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ import { store as coreStore } from '@wordpress/core-data';
*/
import { ItemSubmenuIcon } from './icons';

const ALLOWED_BLOCKS = [ 'core/navigation-link', 'core/spacer' ];

/**
* A React hook to determine if it's dragging within the target element.
*
Expand Down Expand Up @@ -320,7 +322,7 @@ export default function NavigationLinkEdit( {
} ),
},
{
allowedBlocks: [ 'core/navigation-link', 'core/spacer' ],
talldan marked this conversation as resolved.
Show resolved Hide resolved
allowedBlocks: ALLOWED_BLOCKS,
renderAppender:
( isSelected && hasDescendants ) ||
( isImmediateParentOfSelectedBlock &&
Expand Down