Closed arayutw closed 1 year ago
Hi, I just added a section in the documentation with an example and some clarifications, let me know if it helps- https://photoswipe.com/methods/#open-lightbox-via-external-button-with-loadandopen
Types should be looked at as well.
The data source argument is not defined as optional, so it throws out an error when using it as .loadAndOpen(0)
. As mentioned in https://photoswipe.com/methods/#photoswipelightbox-methods.
It seems like loadAndOpen
requires dataSource
, but the preload
function (which is called by loadAndOpen) does not has dataSource
as required.
Is this supposed to be, or is it a bug?
ty @BeeMargarida I updated the docs too and made dataSource
fully optional https://photoswipe.com/methods/#loadandopenindex-datasource-point
That's great, thank you!
Hello. Thank you for your wonderful project.
I would like to check if the second argument of loadAndOpen(), DataSource, can be omitted. Which is correct, types or the documentation?
https://github.com/dimsemenov/PhotoSwipe/blob/master/dist/types/lightbox/lightbox.d.ts#L85
https://photoswipe.com/methods/#photoswipelightbox-methods