fix: disable auto scroll to proxy

This commit is contained in:
GyDi 2022-11-09 11:44:09 +08:00
parent e66a89208d
commit 6e5a2f85a1
No known key found for this signature in database
GPG Key ID: 9C3AD40F1F99880A

View File

@ -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 (
<>