diff --git a/packages/react-core/src/components/Menu/MenuItem.tsx b/packages/react-core/src/components/Menu/MenuItem.tsx index c3deae335bf..b5110dec4d2 100644 --- a/packages/react-core/src/components/Menu/MenuItem.tsx +++ b/packages/react-core/src/components/Menu/MenuItem.tsx @@ -29,6 +29,8 @@ export interface MenuItemProps extends Omit, 'onC target?: string; /** Navigation link relationship. Only set when the to property is present. */ rel?: string; + /** Navigation link download. Only set when the to property is present. */ + download?: string; /** Flag indicating the item has a checkbox */ hasCheckbox?: boolean; /** Flag indicating whether the item is active */ @@ -119,6 +121,7 @@ const MenuItemBase: React.FunctionComponent = ({ tooltipProps, rel, target, + download, ...props }: MenuItemProps) => { const { @@ -271,7 +274,8 @@ const MenuItemBase: React.FunctionComponent = ({ // prevent invalid 'disabled' attribute on tags disabled: null, target: isExternalLink ? '_blank' : target, - rel + rel, + download }; } else if (Component === 'button') { additionalProps = { diff --git a/packages/react-integration/demo-app-ts/src/components/demos/DropdownDemo/DropdownDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/DropdownDemo/DropdownDemo.tsx index e90080ea3c8..0233ce4c467 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/DropdownDemo/DropdownDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/DropdownDemo/DropdownDemo.tsx @@ -28,6 +28,9 @@ const dropDownItems = ( Separated action + + Download + );