From 144197c9540565273515a6d7dd38d3e12a436f05 Mon Sep 17 00:00:00 2001 From: Ivana Date: Mon, 29 Jun 2020 14:26:13 +0200 Subject: [PATCH] Update log row hover background only if context is not open --- .../grafana-ui/src/components/Logs/LogRow.tsx | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/grafana-ui/src/components/Logs/LogRow.tsx b/packages/grafana-ui/src/components/Logs/LogRow.tsx index 24f1abd05d6..71ec24e7911 100644 --- a/packages/grafana-ui/src/components/Logs/LogRow.tsx +++ b/packages/grafana-ui/src/components/Logs/LogRow.tsx @@ -91,19 +91,23 @@ class UnThemedLogRow extends PureComponent { }; /** - * 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 = () => {