From 38645c20a2e3ba24ddda0d9d5ceb2f24b47957a5 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Wed, 25 Mar 2020 10:56:08 +0100 Subject: [PATCH] fix: restore Menu#anchorEl documentation --- packages/material-ui/src/Menu/Menu.d.ts | 1 + packages/material-ui/src/Menu/Menu.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/packages/material-ui/src/Menu/Menu.d.ts b/packages/material-ui/src/Menu/Menu.d.ts index 836decedeb6563..6af9c66a18665e 100644 --- a/packages/material-ui/src/Menu/Menu.d.ts +++ b/packages/material-ui/src/Menu/Menu.d.ts @@ -9,6 +9,7 @@ export interface MenuProps extends StandardProps, MenuClassKey> { /** * The DOM element used to set the position of the menu. + * @document */ anchorEl?: PopoverProps['anchorEl']; /** diff --git a/packages/material-ui/src/Menu/Menu.js b/packages/material-ui/src/Menu/Menu.js index 8b9bf900dc675f..2a96e5d3735e9b 100644 --- a/packages/material-ui/src/Menu/Menu.js +++ b/packages/material-ui/src/Menu/Menu.js @@ -170,6 +170,13 @@ Menu.propTypes = { // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the d.ts file and run "yarn proptypes" | // ---------------------------------------------------------------------- + /** + * The DOM element used to set the position of the menu. + */ + anchorEl: PropTypes.oneOfType([ + PropTypes.func, + PropTypes.instanceOf(typeof Element === 'undefined' ? Object : Element), + ]), /** * If `true` (Default) will focus the `[role="menu"]` if no focusable child is found. Disabled * children are not focusable. If you set this prop to `false` focus will be placed