mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-29 18:12:10 +08:00
fix(proxy): increase debounce delay and refine head state logic (#7464)
This commit is contained in:
@@ -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' })
|
||||
|
||||
Reference in New Issue
Block a user