You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the VirtuosoGrid component. When I prepend the data, I want to focus the current item index, how can I work around this?
The UI I want to implement
List of images
Lists can be of variable size (height)
Fetches a list of subsequent pages from the end of the current page (endReached).
Fetches the list of previous pages from the beginning of the current page (startReached).
If there are no previous/after pages, the list is no longer retrieved.
Here's what I found
Virtuoso can be prepended via the firstItemIndex props, but VirtuosoGrid does not have this props.
prepend data pushes the index of the current item, making the current top item invisible(moved to the bottom).
I need to display a list of images in a grid, so I think VirtuosoGrid is the most appropriate component. Is there an workaround or a method/package you can recommend?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the
VirtuosoGrid
component. When I prepend the data, I want to focus the current item index, how can I work around this?The UI I want to implement
List of images
endReached
).startReached
).Here's what I found
Virtuoso
can be prepended via the firstItemIndex props, butVirtuosoGrid
does not have this props.I need to display a list of images in a grid, so I think
VirtuosoGrid
is the most appropriate component. Is there an workaround or a method/package you can recommend?Beta Was this translation helpful? Give feedback.
All reactions