I am currently using material-ui version 4.9.5.
To illustrate my issue, I have created a simplified example here. I have a Table
that is populated with basic JSON data. Each row in the table consists of an icon element along with its corresponding color and hover color:
{
icon: {
{
iconElement: FolderIcon,
color: "red",
hoverColor: "green"
}
},
projectName: "Project1"
}
This means that each row can have its own unique icon, color, and hover color.
If you take a look at this image: https://i.stack.imgur.com/IpKfE.png, you'll see the setup visually.
My main challenge lies in figuring out how to trigger the hover effect for the individual icon when the user hovers over any part of that row.
Currently, I have managed to implement a hover trigger for the entire row, causing a background change on hover. However, I am struggling to get the icon itself to change upon hovering within that row. Here's what I have so far:
You can view the code sandbox here: https://codesandbox.io/s/icon-hover-color-table-row-q9uim?fontsize=14&hidenavigation=1&theme=dark
// Your React component code goes here...
If you have any suggestions or solutions to this issue, they would be greatly appreciated.