Skip to content

Commit

Permalink
[Popover] Fix wrong getContentAnchorEl definition (#12562)
Browse files Browse the repository at this point in the history
* Fixed missing null from getContentAnchorEl.

* let's merge
  • Loading branch information
duvet86 authored and oliviertassinari committed Aug 18, 2018
1 parent 4dabe25 commit 4f3ef62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/material-ui/src/Popover/Popover.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface PopoverProps
anchorReference?: PopoverReference;
children?: React.ReactNode;
elevation?: number;
getContentAnchorEl?: (element: HTMLElement) => HTMLElement;
getContentAnchorEl?: null | ((element: HTMLElement) => HTMLElement);
marginThreshold?: number;
modal?: boolean;
ModalClasses?: ModalClassKey;
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/Popover/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ class Popover extends React.Component {
'Material-UI: you can not change the default `anchorOrigin.vertical` value ',
'when also providing the `getContentAnchorEl` property to the popover component.',
'Only use one of the two properties.',
'Set `getContentAnchorEl` to null or leave `anchorOrigin.vertical` unchanged.',
'Set `getContentAnchorEl` to `null | undefined`' +
' or leave `anchorOrigin.vertical` unchanged.',
].join('\n'),
);
}
Expand Down

0 comments on commit 4f3ef62

Please sign in to comment.