From 356e058a8a95f16792d2da92b2812327bfc47f5c Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Mon, 26 Aug 2024 12:33:26 +0800 Subject: [PATCH] fix fixed cols --- src/renderer/src/pages/proxies.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/pages/proxies.tsx b/src/renderer/src/pages/proxies.tsx index 3483c95..e11ac25 100644 --- a/src/renderer/src/pages/proxies.tsx +++ b/src/renderer/src/pages/proxies.tsx @@ -29,7 +29,7 @@ const Proxies: React.FC = () => { autoCloseConnection = true, proxyCols = 'auto' } = appConfig || {} - const [cols, setCols] = useState(3) + const [cols, setCols] = useState(1) const [isOpen, setIsOpen] = useState(Array(groups.length).fill(false)) const virtuosoRef = useRef(null) const { groupCounts, allProxies } = useMemo(() => { @@ -259,7 +259,12 @@ const Proxies: React.FC = () => { }) return allProxies[groupIndex] ? (
{Array.from({ length: cols }).map((_, i) => { if (!allProxies[groupIndex][innerIndex * cols + i]) return null