From 9b851cc4150a08bd0bc4af1e5a9a089931efe7e0 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 16 Mar 2018 09:30:34 -0400 Subject: [PATCH] Components: Remove redundant DropdownMenu logic Built into Dropdown. --- components/dropdown-menu/index.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/components/dropdown-menu/index.js b/components/dropdown-menu/index.js index 57555b100671d9..9ddcfd6fa86bff 100644 --- a/components/dropdown-menu/index.js +++ b/components/dropdown-menu/index.js @@ -3,11 +3,6 @@ */ import classnames from 'classnames'; -/** - * WordPress dependencies - */ -import { keycodes } from '@wordpress/utils'; - /** * Internal dependencies */ @@ -17,8 +12,6 @@ import Dashicon from '../dashicon'; import Dropdown from '../dropdown'; import { NavigableMenu } from '../navigable-container'; -const { DOWN } = keycodes; - function DropdownMenu( { icon = 'menu', label, @@ -34,13 +27,6 @@ function DropdownMenu( { className="components-dropdown-menu" contentClassName="components-dropdown-menu__popover" renderToggle={ ( { isOpen, onToggle } ) => { - const openOnArrowDown = ( event ) => { - if ( ! isOpen && event.keyCode === DOWN ) { - event.preventDefault(); - event.stopPropagation(); - onToggle(); - } - }; return (