From 512d690e3eac67ca95212b96f8527b0ffa451a02 Mon Sep 17 00:00:00 2001 From: Eduard Rastoropov Date: Mon, 23 Jul 2018 14:14:12 +0300 Subject: [PATCH 1/2] Added null as acceptable value of anchorEl https://github.com/mui-org/material-ui/issues/12210#issuecomment-406725291 --- packages/material-ui/src/Menu/Menu.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/material-ui/src/Menu/Menu.d.ts b/packages/material-ui/src/Menu/Menu.d.ts index c36e60aefd6d70..c0fffa1f53d609 100644 --- a/packages/material-ui/src/Menu/Menu.d.ts +++ b/packages/material-ui/src/Menu/Menu.d.ts @@ -8,7 +8,7 @@ import { ClassNameMap } from '../styles/withStyles'; export interface MenuProps extends StandardProps, MenuClassKey> { - anchorEl?: HTMLElement | ((element: HTMLElement) => HTMLElement); + anchorEl?: null | HTMLElement | ((element: HTMLElement) => HTMLElement); disableAutoFocusItem?: boolean; MenuListProps?: Partial; PaperProps?: Partial; From adf4d4154045fbcbd93d7ef6655ba966ce48988c Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Mon, 23 Jul 2018 23:19:16 +0200 Subject: [PATCH 2/2] let's merge --- packages/material-ui/src/Menu/Menu.d.ts | 1 - packages/material-ui/src/Popover/Popover.d.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/material-ui/src/Menu/Menu.d.ts b/packages/material-ui/src/Menu/Menu.d.ts index c0fffa1f53d609..1e76c0adcd1dee 100644 --- a/packages/material-ui/src/Menu/Menu.d.ts +++ b/packages/material-ui/src/Menu/Menu.d.ts @@ -8,7 +8,6 @@ import { ClassNameMap } from '../styles/withStyles'; export interface MenuProps extends StandardProps, MenuClassKey> { - anchorEl?: null | HTMLElement | ((element: HTMLElement) => HTMLElement); disableAutoFocusItem?: boolean; MenuListProps?: Partial; PaperProps?: Partial; diff --git a/packages/material-ui/src/Popover/Popover.d.ts b/packages/material-ui/src/Popover/Popover.d.ts index 813e4599214fd5..de2712c73405a9 100644 --- a/packages/material-ui/src/Popover/Popover.d.ts +++ b/packages/material-ui/src/Popover/Popover.d.ts @@ -19,7 +19,7 @@ export type PopoverReference = 'anchorEl' | 'anchorPosition' | 'none'; export interface PopoverProps extends StandardProps, PopoverClassKey, 'children'> { action?: (actions: PopoverActions) => void; - anchorEl?: HTMLElement | ((element: HTMLElement) => HTMLElement); + anchorEl?: null | HTMLElement | ((element: HTMLElement) => HTMLElement); anchorOrigin?: PopoverOrigin; anchorPosition?: PopoverPosition; anchorReference?: PopoverReference;