Use Lightbox component with an InfiniteScroll PhotoAlbum #178
-
Hi, I wonder if it is possible to use a Lightbox component with an PhotoAlbum wrapped in an InfiniteScroll? Best, Arnaud |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi there! Yes, it's possible to use the https://stackblitz.com/edit/react-photo-album-178?file=src%2Fcomponents%2FRowsExample.tsx I'll think about simplifying this integration. I'll probably need to add an <InfiniteScroll
// ...
onClick={({ photos, photo, index }) => ...}
> |
Beta Was this translation helpful? Give feedback.
-
Thank you for the swift reply! I wondered if I could bypass this solution in fact by having a sort of common storage area for both the Lightbox and InfiniteScroll/PhotoAlbum. I'm also developing another paginated view to compare the UX & performances. |
Beta Was this translation helpful? Give feedback.
Hi there!
Yes, it's possible to use the
Lightbox
component with theInfiniteScroll
. You'd just need to keep a copy of all the fetched photos.https://stackblitz.com/edit/react-photo-album-178?file=src%2Fcomponents%2FRowsExample.tsx
I'll think about simplifying this integration. I'll probably need to add an
onClick
callback to theInfiniteScroll
component that also provides a current copy of thephotos
array: