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

Update LinkControl component to utilitse dynamic settings for additional settings "drawer" #18285

Merged
merged 10 commits into from
Nov 6, 2019
6 changes: 2 additions & 4 deletions packages/block-library/src/navigation-menu-item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ import { Fragment, useState, useEffect } from '@wordpress/element';
* @param {Function} setter Setter attribute function.
*/
const updateLinkSetting = ( setter ) => ( setting, value ) => {
if ( setting === 'newTab' ) {
setter( { opensInNewTab: value } );
}
setter( { opensInNewTab: value } );
getdave marked this conversation as resolved.
Show resolved Hide resolved
};

/**
Expand Down Expand Up @@ -219,7 +217,7 @@ function NavigationMenuItemEdit( {
} }
currentSettings={ [
{
id: 'newTab',
id: 'opensInNewTab',
title: __( 'Open in New Tab' ),
checked: opensInNewTab,
},
Expand Down