How do I change the default color for row hover?
See original GitHub issueI’m trying to change the default color for the row hover event. As I see it, the default seems to be,
.MuiTableRow-root.MuiTableRow-hover:hover {
background-color: 'rgba(0, 0, 0, 0.07)';
}
How do I change it from the React component?
Many thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:25 (5 by maintainers)
Top Results From Across the Web
Change default hover color of TableRow MUI - Stack Overflow
I would like to change the default hover color of a MUI TableRow by adding styles to the TableRow. This question has been...
Read more >How to change Background Color of Table Row upon hover?
To change background color of the table row when user hovers over the row using mouse pointer, set the CSS background-color property with...
Read more >Disable hover color change / Retain table row color based on ...
Currently I am trying to keep the color retained in certain conditions, e.g. to show the row record as red when it is...
Read more >Change row hover color RowBound Event AddClass Grid
I have a row bound event to change the background color of a row but I would also like to change the hover...
Read more >Highlight Table Row on hover using CSS - Text Fixer
You can use CSS without any javascript to make the row of a table highlight on hover. All it requires is that 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 Free
Top 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
If anyone read this, that’s how I did it :
The onRowClick assignement enable hover in the grid, the theme override the style of the hover.
I’m not quite sure why do all these people recommend patching the theme 😉
This is how I did it:
The thing is - passing
className
to the<MaterialTable>
element wouldn’t help because it sort of screws up standard MaterialUI techniques a little.