Update scrollArea for relevant pages
This commit is contained in:
parent
a8dfc7bcd6
commit
bbee3fc655
3 changed files with 4 additions and 8 deletions
|
@ -254,8 +254,6 @@ export const AlbumDetailContent = ({ tableRef, background }: AlbumDetailContentP
|
||||||
|
|
||||||
const showGenres = detailQuery?.data?.genres ? detailQuery?.data?.genres.length !== 0 : false;
|
const showGenres = detailQuery?.data?.genres ? detailQuery?.data?.genres.length !== 0 : false;
|
||||||
|
|
||||||
const { intersectRef, tableContainerRef } = useFixedTableHeader();
|
|
||||||
|
|
||||||
const handleGeneralContextMenu = useHandleGeneralContextMenu(
|
const handleGeneralContextMenu = useHandleGeneralContextMenu(
|
||||||
LibraryItem.ALBUM,
|
LibraryItem.ALBUM,
|
||||||
ALBUM_CONTEXT_MENU_ITEMS,
|
ALBUM_CONTEXT_MENU_ITEMS,
|
||||||
|
@ -269,7 +267,6 @@ export const AlbumDetailContent = ({ tableRef, background }: AlbumDetailContentP
|
||||||
<DetailContainer>
|
<DetailContainer>
|
||||||
<Box component="section">
|
<Box component="section">
|
||||||
<Group
|
<Group
|
||||||
ref={showGenres ? null : intersectRef}
|
|
||||||
py="1rem"
|
py="1rem"
|
||||||
spacing="md"
|
spacing="md"
|
||||||
>
|
>
|
||||||
|
@ -308,7 +305,6 @@ export const AlbumDetailContent = ({ tableRef, background }: AlbumDetailContentP
|
||||||
</Box>
|
</Box>
|
||||||
{showGenres && (
|
{showGenres && (
|
||||||
<Box
|
<Box
|
||||||
ref={showGenres ? intersectRef : null}
|
|
||||||
component="section"
|
component="section"
|
||||||
py="1rem"
|
py="1rem"
|
||||||
>
|
>
|
||||||
|
@ -334,14 +330,12 @@ export const AlbumDetailContent = ({ tableRef, background }: AlbumDetailContentP
|
||||||
</Group>
|
</Group>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
<Box
|
<Box style={{ minHeight: '300px' }}>
|
||||||
ref={tableContainerRef}
|
|
||||||
style={{ minHeight: '300px' }}
|
|
||||||
>
|
|
||||||
<VirtualTable
|
<VirtualTable
|
||||||
ref={tableRef}
|
ref={tableRef}
|
||||||
autoFitColumns
|
autoFitColumns
|
||||||
autoHeight
|
autoHeight
|
||||||
|
stickyHeader
|
||||||
suppressCellFocus
|
suppressCellFocus
|
||||||
suppressHorizontalScroll
|
suppressHorizontalScroll
|
||||||
suppressLoadingOverlay
|
suppressLoadingOverlay
|
||||||
|
|
|
@ -50,6 +50,7 @@ const AlbumDetailRoute = () => {
|
||||||
</LibraryHeaderBar.Title>
|
</LibraryHeaderBar.Title>
|
||||||
</LibraryHeaderBar>
|
</LibraryHeaderBar>
|
||||||
),
|
),
|
||||||
|
offset: 200,
|
||||||
target: headerRef,
|
target: headerRef,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
@ -51,6 +51,7 @@ const AlbumArtistDetailRoute = () => {
|
||||||
</LibraryHeaderBar.Title>
|
</LibraryHeaderBar.Title>
|
||||||
</LibraryHeaderBar>
|
</LibraryHeaderBar>
|
||||||
),
|
),
|
||||||
|
offset: 200,
|
||||||
target: headerRef,
|
target: headerRef,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
Reference in a new issue