question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Menu's anchorOrigin and transformOrigin can't be changed

See original GitHub issue
  • This is a v1.x issue (v0.x is no longer maintained).
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

muimenu--><img src="https://user-images.githubusercontent.com/36337818/40283849-69c4d4d6-5c85-11e8-94ec-19a48b2d124e.gif" alt="muimenuenhanced"

Being able to specify points (number, 'top', 'left', 'center', 'bottom' or 'right') on the anchor where the menus’s anchorEl will attach to and the point on the menu which will attach to the anchor’s origin (like Popover).

<Menu
+    anchorOrigin={{ vertical: "top", horizontal: "left" }}
+    transformOrigin={{ vertical: "top", horizontal: "left" }}
    id="simple-menu"
    anchorEl={anchorEl}
    open={Boolean(anchorEl)}
    onClose={this.handleClose}
>
    <MenuItem onClick={this.handleClose}>Profile</MenuItem>
    <MenuItem onClick={this.handleClose}>My account</MenuItem>
    <MenuItem onClick={this.handleClose}>Logout</MenuItem>
</Menu>

Current Behavior

anchorOrigin and transformOrigin are fixed (top left or top right).

Steps to Reproduce (for bugs)

/

Context

I am trying to create nested menus. The problem is that the menus render on top of each other with no way to change the anchor origin to 'right'.

Your Environment

Tech Version
Material-UI v1.0.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
mnemanjacommented, Jun 15, 2018

This answer fixes the error message: https://github.com/mui-org/material-ui/issues/10804

1reaction
oliviertassinaricommented, May 23, 2018

@mnemanja Check the warning in the console.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Menu's anchorOrigin and transformOrigin can't be changed
I am trying to create nested menus. The problem is that the menus render on top of each other with no way to...
Read more >
Material UI: How to change a Menu's MenuItems anchor to ...
Material UI: How to change a Menu's MenuItems anchor to popover below instead ... The anchor origin and transform origin will have the...
Read more >
How should I use transformOrigin in Material UI in Menu ...
You can change the number based on your menu position. transformOrigin={{ vertical: -10, horizontal: 140, }}.
Read more >
anchororigin={{vertical: 'bottom'}} - You.com - You.com
The Menu component spreads the horizontal anchorOrigin property to it's Popover ... Menu's anchorOrigin and transformOrigin can't be changed #11507.
Read more >
Select - MudBlazor - Blazor Component Library
The delimited string can be modified with the Delimiter parameter. ... It can be controlled with AnchorOrigin and TransformOrigin To change where the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found