refactor: Optimize proxy rendering and layout calculation

This commit is contained in:
wonfen
2025-02-20 14:21:55 +08:00
parent 23d1d210c7
commit 2b534e0d51
3 changed files with 89 additions and 243 deletions

View File

@@ -473,7 +473,7 @@ export const ProxyGroups = (props: Props) => {
<div style={{ position: "relative", height: "100%" }}>
<Virtuoso
ref={virtuosoRef}
style={{ height: "calc(100% - 16px)" }}
style={{ height: "calc(100% - 14px)" }}
totalCount={renderList.length}
increaseViewportBy={{ top: 256, bottom: 256 }}
overscan={150}
@@ -482,7 +482,7 @@ export const ProxyGroups = (props: Props) => {
scrollerRef.current = ref as Element;
}}
components={{
Footer: () => <div style={{ height: "16px" }} />,
Footer: () => <div style={{ height: "8px" }} />,
}}
itemContent={(index) => (
<ProxyRender