Procházet zdrojové kódy

fix: disable auto scroll to proxy

GyDi před 2 roky
rodič
revize
6e5a2f85a1
1 změnil soubory, kde provedl 8 přidání a 8 odebrání
  1. 8 8
      src/components/proxy/proxy-group.tsx

+ 8 - 8
src/components/proxy/proxy-group.tsx

@@ -115,14 +115,14 @@ const ProxyGroup = ({ group }: Props) => {
     }
   }, [headState.open, sortedProxies]);
 
-  // auto scroll when sorted changed
-  const timerRef = useRef<any>();
-  useEffect(() => {
-    if (headState.open) {
-      clearTimeout(timerRef.current);
-      timerRef.current = setTimeout(() => onLocation(false), 500);
-    }
-  }, [headState.open, sortedProxies]);
+  // // auto scroll when sorted changed
+  // const timerRef = useRef<any>();
+  // useEffect(() => {
+  //   if (headState.open) {
+  //     clearTimeout(timerRef.current);
+  //     timerRef.current = setTimeout(() => onLocation(false), 500);
+  //   }
+  // }, [headState.open, sortedProxies]);
 
   return (
     <>