Misleading Popover getContentAnchorEl warning when using typescript. #12539
Labels
good first issue
Great for first contributions. Enable to learn the contribution process.
typescript
The warning says:
"Warning: Material-UI: you can not change the default
anchorOrigin.vertical
valuewhen also providing the
getContentAnchorEl
property to the popover component.Only use one of the two properties.
Set
getContentAnchorEl
to null or leaveanchorOrigin.vertical
unchanged."But the typescript definition doesn't accept null:
getContentAnchorEl?: (element: HTMLElement) => HTMLElement;
I suggest to update the prop definition to accept null values.
getContentAnchorEl?: null | ((element: HTMLElement) => HTMLElement);
It is working fine when set to undefined.
The text was updated successfully, but these errors were encountered: