How to access and overide div element of menuitem component?
See original GitHub issueSo, here is my code snippet :
{options.map(({ label, value }) => ( <MenuItem className={classes.root} key={value} value={value}>{label}</MenuItem> ))}
and the above code generates an output like this.
having a div followed by unordered list. but what if, If someone want to overide properties of the div element here.
I have tried passing className={classes.root}
to it what it is doing is applying modification to first unordered list instead of applying it to div elment that is the parent of all unordered list.
but what it is doing is applying my modified properties to the ul element instead of the parent div. see screenshot below.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
reactjs - I want to override style of div of MenuItem component ...
First ul item is at 60 px from top, but what I want is to put this entire div 60 px down from...
Read more >How to access and overide div element of menuitem ... - GitHub
There is a PaperProps property on the Menu to access the element. If you are using the Select component, it's a bit tricker,...
Read more >MenuItem API - Material UI - MUI
Name Type Default
autoFocus bool false
children node
classes object
Read more >CSS Overrides Migration for the Navigation Menu
CSS Overrides Migration for the Navigation Menu. If you plan to continue using custom CSS overrides, migrate them forward after you update the...
Read more >Each menu item has new css | WordPress.org
[This thread is closed.] Hello, I want to know each menu item has its own new css or not ? I was looking...
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
https://material-ui.com/utils/popover/#anchor-playground
Next time, please submit support requests and questions to StackOverflow using the tag material-ui. StackOverflow is better suited for this kind of support. The issue tracker is for bug reports and feature discussions. See also our CONTRIBUTING guidelines.
@divyanshu-rawat If you want to change the popover position, check the property available on this end.