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 a03c2719210..a91811634f0 100644 --- a/public/app/plugins/panel/logs/LogsPanel.tsx +++ b/public/app/plugins/panel/logs/LogsPanel.tsx @@ -101,9 +101,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: { @@ -116,6 +114,10 @@ export const LogsPanel = ({ [eventBus] ); + const onLogContainerMouseLeave = useCallback(() => { + eventBus.publish(new DataHoverClearEvent()); + }, [eventBus]); + const onCloseContext = useCallback(() => { setContextRow(null); if (closeCallback.current) { @@ -308,7 +310,7 @@ export const LogsPanel = ({ scrollTop={scrollTop} scrollRefCallback={(scrollElement) => setScrollElement(scrollElement)} > -
+
{showCommonLabels && !isAscending && renderCommonLabels()}