diff --git a/public/app/features/logs/components/LogRow.tsx b/public/app/features/logs/components/LogRow.tsx index 79bbdbe250c..2db64630c27 100644 --- a/public/app/features/logs/components/LogRow.tsx +++ b/public/app/features/logs/components/LogRow.tsx @@ -149,9 +149,6 @@ class UnThemedLogRow extends PureComponent { onMouseLeave = () => { this.setState({ mouseIsOver: false }); - if (this.props.onLogRowHover) { - this.props.onLogRowHover(undefined); - } }; componentDidMount() { diff --git a/public/app/plugins/panel/logs/LogsPanel.tsx b/public/app/plugins/panel/logs/LogsPanel.tsx index b1269af69c0..a6fcd2eb53d 100644 --- a/public/app/plugins/panel/logs/LogsPanel.tsx +++ b/public/app/plugins/panel/logs/LogsPanel.tsx @@ -114,9 +114,7 @@ export const LogsPanel = ({ const { eventBus, onAddAdHocFilter } = usePanelContext(); const onLogRowHover = useCallback( (row?: LogRowModel) => { - if (!row) { - eventBus.publish(new DataHoverClearEvent()); - } else { + if (row) { eventBus.publish( new DataHoverEvent({ point: { @@ -129,6 +127,10 @@ export const LogsPanel = ({ [eventBus] ); + const onLogContainerMouseLeave = useCallback(() => { + eventBus.publish(new DataHoverClearEvent()); + }, [eventBus]); + const onCloseContext = useCallback(() => { setContextRow(null); if (closeCallback.current) { @@ -350,7 +352,7 @@ export const LogsPanel = ({ scrollTop={scrollTop} scrollRefCallback={(scrollElement) => setScrollElement(scrollElement)} > -
+
{showCommonLabels && !isAscending && renderCommonLabels()}