Skip to content

Commit

Permalink
Fix: Make navigation page list load its items on navigation sidebar. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta authored and ntsekouras committed Mar 7, 2023
1 parent ebc797b commit 079891e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function SidebarNavigationScreenNavigationMenus() {

const onSelect = useCallback(
( selectedBlock ) => {
const { attributes } = selectedBlock;
const { attributes, name } = selectedBlock;
if (
attributes.kind === 'post-type' &&
attributes.id &&
Expand All @@ -100,6 +100,12 @@ export default function SidebarNavigationScreenNavigationMenus() {
postId: attributes.id,
} );
}
if ( name === 'core/page-list-item' && attributes.id && history ) {
history.push( {
postType: 'page',
postId: attributes.id,
} );
}
},
[ history ]
);
Expand Down

0 comments on commit 079891e

Please sign in to comment.