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
--> | <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:
- Created 5 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This answer fixes the error message: https://github.com/mui-org/material-ui/issues/10804
@mnemanja Check the warning in the console.