From 7418127da21e52956e4371d524509d2ecee37417 Mon Sep 17 00:00:00 2001
From: Anthony Geourjon <anthony.geourjon@tetras-libre.fr>
Date: Tue, 9 Jan 2024 01:15:49 +0100
Subject: [PATCH] WIP Commit de la victoire, need to be cleaned

---
 src/components/CanvasAnnotations.js             | 2 ++
 src/components/WindowSideBarAnnotationsPanel.js | 5 +----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/components/CanvasAnnotations.js b/src/components/CanvasAnnotations.js
index 870fd099f..46ea83a18 100644
--- a/src/components/CanvasAnnotations.js
+++ b/src/components/CanvasAnnotations.js
@@ -153,6 +153,7 @@ export class CanvasAnnotations extends Component {
                 selected={selectedAnnotationId === annotation.id}
               >
                 <MenuItem
+                  component={listContainerComponent}
                   variant="multiline"
                   divider
                   sx={{
@@ -161,6 +162,7 @@ export class CanvasAnnotations extends Component {
                     },
                     backgroundColor: hoveredAnnotationIds.includes(annotation.id) ? 'action.hover' : '',
                   }}
+                  ref={containerRef}
                   key={annotation.id}
                   annotationid={annotation.id}
                   selected={selectedAnnotationId === annotation.id}
diff --git a/src/components/WindowSideBarAnnotationsPanel.js b/src/components/WindowSideBarAnnotationsPanel.js
index a83699fda..761d41e3a 100644
--- a/src/components/WindowSideBarAnnotationsPanel.js
+++ b/src/components/WindowSideBarAnnotationsPanel.js
@@ -19,10 +19,7 @@ function WindowSideBarAnnotationsPanel({
 
   useEffect(() => {
     console.log(`Use effect ${containerRef}`);
-    console.log(`Use effect ${containerRef.current}`);
-    if(containerRef.current) {
-      containerRef.current.focus();
-    }
+    console.log(`Use effect current ${containerRef.current}`);
   });
 
   return (
-- 
GitLab