Skip to content

Commit

Permalink
Use Id ref
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed May 23, 2023
1 parent 3d3d958 commit 683c3be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/block-library/src/navigation/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ function Navigation( {
// Allow for this to continue to be used.
const ref = attributes.slug || attributes.ref;

// "ref" attribute is the integer-based reference.
const [ idRef, setIdRef ] = useState( attributes.ref );

const setRef = useCallback(
Expand Down Expand Up @@ -365,7 +366,7 @@ function Navigation( {
}, [
createNavigationMenuStatus,
createNavigationMenuError,
createNavigationMenuPost?.id,
createNavigationMenuPost,
createNavigationMenuIsError,
createNavigationMenuIsSuccess,
isCreatingNavigationMenu,
Expand Down Expand Up @@ -750,7 +751,7 @@ function Navigation( {
}

return (
<EntityProvider kind="postType" type="wp_navigation" id={ ref }>
<EntityProvider kind="postType" type="wp_navigation" id={ idRef }>
<RecursionProvider uniqueId={ recursionId }>
<MenuInspectorControls
clientId={ clientId }
Expand Down

0 comments on commit 683c3be

Please sign in to comment.