[v10.0.x] Annotations: Fix rendering (#68146)

This commit is contained in:
Grot (@grafanabot)
2023-05-09 23:45:35 +03:00
committed by GitHub
parent 58efebbf14
commit 8139833afd
@@ -28,6 +28,11 @@ export const AnnotationsPlugin = ({ annotations, timeZone, config }: Annotations
}
annotationsRef.current = views;
return () => {
// clear on unmount
annotationsRef.current = [];
};
}, [annotations]);
useLayoutEffect(() => {