fix: group tools filter and layout (#7431)

* fix(proxy): group filter

* refactor(proxy): improve layout and structure of proxy render components

* refactor(proxy): remove unnecessary flushSync calls in proxy-group-tools

* feat(proxy): debounce filter input in ProxyGroupTools

* refactor(base-search-box): initialize lastSearchStateRef with current state

* refactor(proxy): remove debug console.log in proxy-groups

* refactor(proxy): improve scrolling behavior in proxy groups

* refactor(proxy): improve scroll position restoration logic

* chore(proxy): reset proxy group tools layout

* style(proxy): adjust margins and spacing in proxy components

* refactor(proxy): remove commented out ProxyGroupTools component
This commit is contained in:
oomeow
2026-07-11 07:38:32 +00:00
committed by GitHub
parent 562828e14d
commit 1847002ebe
5 changed files with 195 additions and 116 deletions
+9 -1
View File
@@ -86,7 +86,15 @@ export const BaseSearchBox = ({
}: SearchProps) => {
const { t } = useTranslation()
const onSearchRef = useRef(onSearch)
const lastSearchStateRef = useRef<SearchState | null>(null)
// 用初始状态初始化,使挂载时的 emitSearch 因状态相同而被跳过,
// 从而只在输入内容真正变化时才触发 onSearch(也可避免 StrictMode 下的重复调用)。
const lastSearchStateRef = useRef<SearchState | null>({
text: value ?? defaultValue ?? '',
matchCase: searchState?.matchCase ?? defaultMatchCase,
matchWholeWord: searchState?.matchWholeWord ?? defaultMatchWholeWord,
useRegularExpression:
searchState?.useRegularExpression ?? defaultUseRegularExpression,
})
const [text, setText] = useControllableState<string>({
controlled: value,
+1 -4
View File
@@ -279,10 +279,7 @@ export const StickyVirtualList = forwardRef(function StickyVirtualListInner<
transform: `translateY(${virtualRow.start}px)`,
width: '100%',
zIndex: 1,
...(isGroup && {
opacity: 0,
zIndex: -10,
}),
...(isGroup && { visibility: 'hidden' }),
}}
>
{isGroup