Update log row hover background only if context is not open

This commit is contained in:
Ivana 2020-06-29 14:26:13 +02:00
parent b13a4e048b
commit 144197c954

View File

@ -91,19 +91,23 @@ class UnThemedLogRow extends PureComponent<Props, State> {
};
/**
* We are using onMouse events to change background of Log Details Table to hover-state-background when
* hovered over Log Row and vice versa. This can't be done with css because we use 2 separate table rows without common parent element.
* We are using onMouse events to change background of Log Details Table to hover-state-background when hovered over Log
* Row and vice versa, when context is not open. This can't be done with css because we use 2 separate table rows without common parent element.
*/
addHoverBackground = () => {
this.setState({
hasHoverBackground: true,
});
if (!this.state.showContext) {
this.setState({
hasHoverBackground: true,
});
}
};
clearHoverBackground = () => {
this.setState({
hasHoverBackground: false,
});
if (!this.state.showContext) {
this.setState({
hasHoverBackground: false,
});
}
};
toggleDetails = () => {