Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored and scruffian committed Mar 7, 2023
1 parent 84c220b commit 38fc111
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion packages/block-library/src/navigation/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,17 @@ function Navigation( {
[ navigationMenus ]
);

const handleUpdateMenu = useCallback(
( menuId, options = { focusNavigationBlock: false } ) => {
const { focusNavigationBlock } = options;
setRef( menuId );
if ( focusNavigationBlock ) {
selectBlock( clientId );
}
},
[ selectBlock, clientId, setRef ]
);

// Attempt to retrieve and prioritize any existing navigation menu unless:
// - the are uncontrolled inner blocks already present in the block.
// - the user is creating a new menu.
Expand Down Expand Up @@ -340,7 +351,13 @@ function Navigation( {
__unstableMarkNextChangeAsNotPersistent();
replaceInnerBlocks( clientId, [ createBlock( 'core/page-list' ) ] );
}
}, [ clientId, isPlaceholder, ref ] );
}, [
clientId,
isPlaceholder,
ref,
__unstableMarkNextChangeAsNotPersistent,
replaceInnerBlocks,
] );

// "loading" state:
// - there is a menu creation process in progress.
Expand Down

0 comments on commit 38fc111

Please sign in to comment.