mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
Timeseries: Fix TooltipPlugin hooks warning (#71978)
This commit is contained in:
parent
9cf309288b
commit
16562faea6
@ -63,6 +63,8 @@ export const TooltipPlugin = ({
|
|||||||
|
|
||||||
const pluginId = `TooltipPlugin`;
|
const pluginId = `TooltipPlugin`;
|
||||||
|
|
||||||
|
const style = useStyles2(getStyles);
|
||||||
|
|
||||||
// Debug logs
|
// Debug logs
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
pluginLog(pluginId, true, `Focused series: ${focusedSeriesIdx}, focused point: ${focusedPointIdx}`);
|
pluginLog(pluginId, true, `Focused series: ${focusedSeriesIdx}, focused point: ${focusedPointIdx}`);
|
||||||
@ -274,8 +276,6 @@ export const TooltipPlugin = ({
|
|||||||
tooltip = renderTooltip(otherProps.data, focusedSeriesIdx, focusedPointIdx);
|
tooltip = renderTooltip(otherProps.data, focusedSeriesIdx, focusedPointIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
const style = useStyles2(getStyles);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Portal className={isActive ? style.tooltipWrapper : undefined}>
|
<Portal className={isActive ? style.tooltipWrapper : undefined}>
|
||||||
{tooltip && coords && (
|
{tooltip && coords && (
|
||||||
|
Loading…
Reference in New Issue
Block a user