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.

How to access and overide div element of menuitem component?

See original GitHub issue

So, 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.

screen shot 2018-09-30 at 12 44 53 am

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.

screen shot 2018-09-30 at 12 52 47 am

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Sep 30, 2018

sorry to say, I didn’t get this thing, property available on this end?

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.

1reaction
oliviertassinaricommented, Sep 30, 2018

@divyanshu-rawat If you want to change the popover position, check the property available on this end.

Read more comments on GitHub >

github_iconTop 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 >

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