mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
refactor grid list to support index offset
This commit is contained in:
@@ -56,7 +56,10 @@ export const AlbumListInfiniteGrid = forwardRef<any, AlbumListInfiniteGridProps>
|
||||
<ItemGridList
|
||||
data={data}
|
||||
gap={gap}
|
||||
initialTop={scrollOffset ?? 0}
|
||||
initialTop={{
|
||||
to: scrollOffset ?? 0,
|
||||
type: 'offset',
|
||||
}}
|
||||
itemsPerRow={itemsPerRow}
|
||||
itemType={LibraryItem.ALBUM}
|
||||
onRangeChanged={onRangeChanged}
|
||||
|
||||
@@ -57,7 +57,10 @@ export const AlbumArtistListInfiniteGrid = forwardRef<any, AlbumArtistListInfini
|
||||
<ItemGridList
|
||||
data={data}
|
||||
gap={gap}
|
||||
initialTop={scrollOffset ?? 0}
|
||||
initialTop={{
|
||||
to: scrollOffset ?? 0,
|
||||
type: 'offset',
|
||||
}}
|
||||
itemsPerRow={itemsPerRow}
|
||||
itemType={LibraryItem.ALBUM_ARTIST}
|
||||
onRangeChanged={onRangeChanged}
|
||||
|
||||
@@ -57,7 +57,10 @@ export const ArtistListInfiniteGrid = forwardRef<any, ArtistListInfiniteGridProp
|
||||
<ItemGridList
|
||||
data={data}
|
||||
gap={gap}
|
||||
initialTop={scrollOffset ?? 0}
|
||||
initialTop={{
|
||||
to: scrollOffset ?? 0,
|
||||
type: 'offset',
|
||||
}}
|
||||
itemsPerRow={itemsPerRow}
|
||||
itemType={LibraryItem.ARTIST}
|
||||
onRangeChanged={onRangeChanged}
|
||||
|
||||
@@ -57,7 +57,10 @@ export const GenreListInfiniteGrid = forwardRef<any, GenreListInfiniteGridProps>
|
||||
<ItemGridList
|
||||
data={data}
|
||||
gap={gap}
|
||||
initialTop={scrollOffset ?? 0}
|
||||
initialTop={{
|
||||
to: scrollOffset ?? 0,
|
||||
type: 'offset',
|
||||
}}
|
||||
itemsPerRow={itemsPerRow}
|
||||
itemType={LibraryItem.GENRE}
|
||||
onRangeChanged={onRangeChanged}
|
||||
|
||||
@@ -52,7 +52,10 @@ export const SongListInfiniteGrid = forwardRef<any, SongListInfiniteGridProps>(
|
||||
<ItemGridList
|
||||
data={data}
|
||||
gap={gap}
|
||||
initialTop={scrollOffset ?? 0}
|
||||
initialTop={{
|
||||
to: scrollOffset ?? 0,
|
||||
type: 'offset',
|
||||
}}
|
||||
itemsPerRow={itemsPerRow}
|
||||
itemType={LibraryItem.SONG}
|
||||
onRangeChanged={onRangeChanged}
|
||||
|
||||
Reference in New Issue
Block a user