From 033734047101ebcb66a66d6cc23c9d8fec16e299 Mon Sep 17 00:00:00 2001 From: oomeow Date: Sun, 12 Jul 2026 16:22:22 +0800 Subject: [PATCH] fix(proxy): increase debounce delay and refine head state logic (#7464) --- src/components/proxy/proxy-group-tools.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/proxy/proxy-group-tools.tsx b/src/components/proxy/proxy-group-tools.tsx index fa39b2770..b3bdc5e59 100644 --- a/src/components/proxy/proxy-group-tools.tsx +++ b/src/components/proxy/proxy-group-tools.tsx @@ -77,7 +77,7 @@ export const ProxyGroupTools = memo(function ProxyGroupTools(props: Props) { filterUseRegularExpression: state.useRegularExpression, }) }, - { wait: 300 }, + { wait: 600 }, ) // 关闭过滤框或卸载时立即应用最后一次输入,避免丢失未生效的过滤条件。 @@ -201,9 +201,6 @@ export const ProxyGroupTools = memo(function ProxyGroupTools(props: Props) { onClick={(e) => { e.preventDefault() e.stopPropagation() - if (!headState.open) - // eslint-disable-next-line @eslint-react/dom-no-flush-sync - flushSync(() => onHeadState({ open: true })) onHeadState({ textState: textState === 'url' ? null : 'url', }) @@ -247,7 +244,7 @@ export const ProxyGroupTools = memo(function ProxyGroupTools(props: Props) { onClick={(e) => { e.preventDefault() e.stopPropagation() - if (!headState.open) + if (!headState.open && textState !== 'filter') // eslint-disable-next-line @eslint-react/dom-no-flush-sync flushSync(() => onHeadState({ open: true })) onHeadState({ textState: textState === 'filter' ? null : 'filter' })