Skip to content

Commit

Permalink
Navigation: Manage navigation link appender visibility based on curre…
Browse files Browse the repository at this point in the history
…nt selection (#19846)

Show the navigation link appender when the selected item has descendants and is selected, or if it's the parent of the selected block.
  • Loading branch information
jeryj authored Jan 23, 2020
1 parent e18e0a0 commit 7704da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function NavigationLinkEdit( {
</div>
<InnerBlocks
allowedBlocks={ [ 'core/navigation-link' ] }
renderAppender={ ( hasDescendants && isSelected ) ? InnerBlocks.DefaultAppender : false }
renderAppender={ ( ( hasDescendants && isSelected ) || isParentOfSelectedBlock ) ? InnerBlocks.DefaultAppender : false }
/>
</div>
</Fragment>
Expand Down

0 comments on commit 7704da0

Please sign in to comment.