From 6e5a2f85a1ddfe7a948cc9407dca5d245feac42e Mon Sep 17 00:00:00 2001
From: GyDi <zzzgydi@gmail.com>
Date: Wed, 9 Nov 2022 11:44:09 +0800
Subject: [PATCH] fix: disable auto scroll to proxy

---
 src/components/proxy/proxy-group.tsx | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/components/proxy/proxy-group.tsx b/src/components/proxy/proxy-group.tsx
index 61debdf..95d8adb 100644
--- a/src/components/proxy/proxy-group.tsx
+++ b/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 (
     <>
-- 
GitLab