From 175c4371332a42e6a0b51f3c738a9c1e07607c92 Mon Sep 17 00:00:00 2001 From: Cristian Necula Date: Mon, 11 Dec 2023 03:02:22 +0200 Subject: [PATCH] fix: loop does not work --- lib/hooks/use-cosmoz-image-viewer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hooks/use-cosmoz-image-viewer.js b/lib/hooks/use-cosmoz-image-viewer.js index 11bb835..5069a7c 100644 --- a/lib/hooks/use-cosmoz-image-viewer.js +++ b/lib/hooks/use-cosmoz-image-viewer.js @@ -53,6 +53,7 @@ const onImageError = (e) => { [isZoomed, setIsZoomed] = useState(false), _onZoomChanged = (ev) => setIsZoomed(ev.detail.value > 1), { slide, next, prev, goto, index } = useSlideList(images, { + loop, initial: images[host.currentImageIndex], render: (image) => render({ image, showZoom, isZoomed, _onZoomChanged }),