diff --git a/packages/patternfly-4/react-core/src/components/Dropdown/DropdownMenu.js b/packages/patternfly-4/react-core/src/components/Dropdown/DropdownMenu.js index 175bc09ff0b..b5ea4d554ec 100644 --- a/packages/patternfly-4/react-core/src/components/Dropdown/DropdownMenu.js +++ b/packages/patternfly-4/react-core/src/components/Dropdown/DropdownMenu.js @@ -118,34 +118,31 @@ class DropdownMenu extends React.Component { render() { const { className, isOpen, position, children, component: Component, openedOnEnter, ...props } = this.props; - let menu = null; - if (Component === 'div') { - menu = ( - - {onSelect => ( - - )} - - ); - } else if (Component === 'ul') { - menu = ( - + + return ( + + {Component === 'div' ? ( + + {onSelect => ( + + )} + + ) : ( {this.extendChildren()} - - ); - } - return menu; + )} + + ); } } diff --git a/packages/patternfly-4/react-core/src/components/Dropdown/__snapshots__/Dropdown.test.js.snap b/packages/patternfly-4/react-core/src/components/Dropdown/__snapshots__/Dropdown.test.js.snap index 1408e09d716..54745c71d8e 100644 --- a/packages/patternfly-4/react-core/src/components/Dropdown/__snapshots__/Dropdown.test.js.snap +++ b/packages/patternfly-4/react-core/src/components/Dropdown/__snapshots__/Dropdown.test.js.snap @@ -145,21 +145,24 @@ exports[`KebabToggle basic 1`] = ` isOpen={true} position="left" > - + @@ -1966,21 +1969,24 @@ exports[`dropdown basic 1`] = ` isOpen={true} position="left" > - +