fix(export): align session sticky columns

This commit is contained in:
aits2026
2026-03-10 15:31:15 +08:00
parent 0d9fcc731a
commit 4489a0f702
2 changed files with 25 additions and 36 deletions

View File

@@ -1513,6 +1513,7 @@ function ExportPage() {
const [nowTick, setNowTick] = useState(Date.now())
const [isContactsListAtTop, setIsContactsListAtTop] = useState(true)
const [isContactsHeaderDragging, setIsContactsHeaderDragging] = useState(false)
const [contactsListScrollParent, setContactsListScrollParent] = useState<HTMLDivElement | null>(null)
const [contactsHorizontalScrollMetrics, setContactsHorizontalScrollMetrics] = useState({
viewportWidth: 0,
contentWidth: 0
@@ -1600,6 +1601,10 @@ function ExportPage() {
endIndex: -1
})
const handleContactsListScrollParentRef = useCallback((node: HTMLDivElement | null) => {
setContactsListScrollParent(prev => (prev === node ? prev : node))
}, [])
const ensureExportCacheScope = useCallback(async (): Promise<string> => {
if (exportCacheScopeReadyRef.current) {
return exportCacheScopeRef.current
@@ -6492,11 +6497,13 @@ function ExportPage() {
) : (
<div
className="contacts-list"
ref={handleContactsListScrollParentRef}
onWheelCapture={handleContactsListWheelCapture}
>
<Virtuoso
ref={contactsVirtuosoRef}
className="contacts-virtuoso"
customScrollParent={contactsListScrollParent ?? undefined}
data={filteredContacts}
computeItemKey={(_, contact) => contact.username}
fixedItemHeight={76}