feat: Improve Virtuoso list rendering for proxy groups

This commit is contained in:
wonfen 2025-02-17 14:30:21 +08:00
parent a179591ac2
commit 772f3268ce

View File

@ -204,10 +204,15 @@ export const ProxyGroups = (props: Props) => {
ref={virtuosoRef} ref={virtuosoRef}
style={{ height: "calc(100% - 16px)" }} style={{ height: "calc(100% - 16px)" }}
totalCount={renderList.length} totalCount={renderList.length}
increaseViewportBy={256} increaseViewportBy={{ top: 256, bottom: 256 }}
overscan={150}
defaultItemHeight={56}
scrollerRef={(ref) => { scrollerRef={(ref) => {
scrollerRef.current = ref; scrollerRef.current = ref;
}} }}
components={{
Footer: () => <div style={{ height: "16px" }} />,
}}
itemContent={(index) => ( itemContent={(index) => (
<ProxyRender <ProxyRender
key={renderList[index].key} key={renderList[index].key}