Annotations: Fix rendering (#68038)

This commit is contained in:
Adela Almasan 2023-05-09 15:12:02 -05:00 committed by GitHub
parent c9e5c229ec
commit 13603c7d71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,11 @@ export const AnnotationsPlugin = ({ annotations, timeZone, config }: Annotations
} }
annotationsRef.current = views; annotationsRef.current = views;
return () => {
// clear on unmount
annotationsRef.current = [];
};
}, [annotations]); }, [annotations]);
useLayoutEffect(() => { useLayoutEffect(() => {