-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Hello!
What's the intended behaviour when closing the lightbox? I thought fslightbox would take care about the toggler state on close, however this seems not to be the case? I then tried to flipping the toggle state in the onClose callback, however, this leads to the lightbox opening again immediately and only after a second close the lightbox closes successfully.
What is the best way to implement the closing behaviour properly? Thanks
const [lightboxOpen, setLightboxOpen] = useState(false);
[...]
{image_slider && imagesLightbox && (
<FsLightbox
toggler={lightboxOpen}
sources={imagesLightbox}
onClose={() => {
setLightboxOpen(false);
}}
/>
)}```
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels