diff --git a/CHANGELOG.md b/CHANGELOG.md index 33b08528ac..81303996dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Fix `defaultOpen` prop in the `Popup` component @mnajdova ([#659](https://github.com/stardust-ui/react/pull/659)) - Fix `Chat` - added themes values for dark and contrast @bcalvery ([#652](https://github.com/stardust-ui/react/pull/652)) - Fix compatibility with TypeScript 3.2 and handle `null` as a valid value in all optional props @layershifter ([#550](https://github.com/stardust-ui/react/pull/550)) +- Fix `MenuItem` - `onFocus` is not handled as prop @sophieH29 ([#677](https://github.com/stardust-ui/react/pull/677)) ### Features - Add `color` prop to `Text` component @Bugaa92 ([#597](https://github.com/stardust-ui/react/pull/597)) diff --git a/src/components/Menu/MenuItem.tsx b/src/components/Menu/MenuItem.tsx index 567432c6a3..e8a6e757b8 100644 --- a/src/components/Menu/MenuItem.tsx +++ b/src/components/Menu/MenuItem.tsx @@ -61,12 +61,11 @@ export interface MenuItemProps onClick?: ComponentEventHandler /** - * Called on key down pressed. - * + * Called after user's focus. * @param {SyntheticEvent} event - React's original SyntheticEvent. * @param {object} data - All props. */ - onKeyDown?: ComponentEventHandler + onFocus?: ComponentEventHandler /** A menu can adjust its appearance to de-emphasize its contents. */ pills?: boolean @@ -132,6 +131,7 @@ class MenuItem extends AutoControlledComponent, MenuIt iconOnly: PropTypes.bool, index: PropTypes.number, onClick: PropTypes.func, + onFocus: PropTypes.func, pills: PropTypes.bool, pointing: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['start', 'end'])]), primary: customPropTypes.every([customPropTypes.disallow(['secondary']), PropTypes.bool]),