I don't know if it's bug or feature, when I used these dependacies:
"@material-ui/core": "4.8.3",
"@material-ui/lab": "4.0.0-alpha.37"
After losing focus from some TreeItem and selecting another TreeItem, I didnt see any TreeItem backgroud on TreeItems selected previously.

Now, after updating to:
"@material-ui/core": "^4.11.3"
"@material-ui/lab": "^4.0.0-alpha.57"
I can see some light blue background on TreeItems, that were selected to node expending.
So maybe it's some new feature, and someone know how to disable it?
Overriding current styles of TreeItem like below will remove the unwanted background color. SandBox
const useStyles = makeStyles({
"@global": {
".MuiTreeItem-root.Mui-selected > .MuiTreeItem-content .MuiTreeItem-label": {
backgroundColor: "white"
},
".MuiTreeItem-root.Mui-selected > .MuiTreeItem-content .MuiTreeItem-label:hover, .MuiTreeItem-root.Mui-selected:focus > .MuiTreeItem-content .MuiTreeItem-label": {
backgroundColor: "gray"
}
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With