Yuki Takei 4 лет назад
Родитель
Сommit
598b474dee
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      packages/app/src/components/Sidebar.tsx

+ 5 - 1
packages/app/src/components/Sidebar.tsx

@@ -244,6 +244,10 @@ const Sidebar: FC<Props> = (props: Props) => {
 
 
   // open/close resizable container
   // open/close resizable container
   useEffect(() => {
   useEffect(() => {
+    if (!isCollapsed) {
+      return;
+    }
+
     if (isHoverOnResizableContainer) {
     if (isHoverOnResizableContainer) {
       // schedule to open
       // schedule to open
       timeoutIdRef.current = setTimeout(() => {
       timeoutIdRef.current = setTimeout(() => {
@@ -262,7 +266,7 @@ const Sidebar: FC<Props> = (props: Props) => {
       setContentWidth(sidebarMinimizeWidth);
       setContentWidth(sidebarMinimizeWidth);
       timeoutIdRef.current = undefined;
       timeoutIdRef.current = undefined;
     }
     }
-  }, [isHover, isHoverOnResizableContainer, currentProductNavWidth, setContentWidth]);
+  }, [isCollapsed, isHover, isHoverOnResizableContainer, currentProductNavWidth, setContentWidth]);
 
 
   return (
   return (
     <>
     <>