diff --git a/types/react-aria-menubutton/index.d.ts b/types/react-aria-menubutton/index.d.ts index 157fdff642..0d03c392e8 100644 --- a/types/react-aria-menubutton/index.d.ts +++ b/types/react-aria-menubutton/index.d.ts @@ -100,7 +100,7 @@ export interface MenuItemProps * If value has a value, it will be passed to the onSelection handler * when the `MenuItem` is selected */ - value?: string | boolean | number; + value?: any; /** * If `text` has a value, its first letter will be the letter a user can diff --git a/types/react-aria-menubutton/react-aria-menubutton-tests.tsx b/types/react-aria-menubutton/react-aria-menubutton-tests.tsx index f284e932a4..7237872d62 100644 --- a/types/react-aria-menubutton/react-aria-menubutton-tests.tsx +++ b/types/react-aria-menubutton/react-aria-menubutton-tests.tsx @@ -121,3 +121,18 @@ closeMenu("", { focusMenu: true }); openMenu(""); openMenu("", { focusMenu: true }); + +class ObjectMenuItem extends React.Component { + render() { + const itemValue = { name: "Test name", label: "Only item to select" } + return ( + console.log(value.name)}> +
  • + {itemValue.label} +
  • +
    + ) + } +} + +ReactDOM.render(, document.body); \ No newline at end of file