support dynamic header album name in paginated list

This commit is contained in:
jeffvli
2026-02-09 21:17:47 -08:00
parent 1a51d52047
commit 6462d46c79
@@ -1213,7 +1213,9 @@ export const ItemDetailList = ({
lastVisibleStartIndexRef.current = range.startIndex;
const el = headerLeftRef.current;
if (el) {
const album = getItem?.(range.startIndex) as Album | undefined;
const album = (
getItem ? getItem(range.startIndex) : dataSourceRef.current[range.startIndex]
) as Album | undefined;
const name = album?.name ?? '';
if (name) {
lastHeaderNameRef.current = name;