Open rejas opened 4 years ago
Hi @rejas. As far as I know, you can use openOnMount
property to start with the lightbox already opened.
Thanks for the info, but I tried that and all I got then was
Uncaught TypeError: Cannot read property 'zero' of undefined
My code looks like this:
<FsLightbox
toggler={toggler}
sources={lightboxImages}
sourceIndex={imageIndex}
openOnMount={true}
/>
Seems like something related to issue #157 ?
Maybe you were passing empty sources at start? The #157 was solved, maybe your issue too.
Thanks a lot for your library, but I am wondering how I can add it to a page and use a parameter to open it with a specific index when the page is loaded? Couldnt find anything in the docs or stackoverflow. You got any idea or is that not possible?