Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo with showLightBox= false option is giving "Uncaught TypeError: Cannot set property 'showLightBox' of undefined" #28

Closed
flakobatako opened this issue Nov 6, 2017 · 1 comment

Comments

@flakobatako
Copy link

If i try the demo everything works as expected, but if i try to use the option showLightBox= false, whenever i click a thumbnail i'm getting the message: "Uncaught TypeError: Cannot set property 'showLightBox' of undefined".

@covertbert
Copy link

covertbert commented Mar 13, 2018

In case you're still stuck on this or anyone else comes here in the future... I got this error too and it's because you have to specify a ref of lightbox when you render the component.

e.g: lightbox(:images="images", :showLightBox="false", :autoPlay="true", ref="lightbox")

By doing this you can call this.$refs.lightbox.showImage(index) and this.$refs won't be undefined.

@pexea12 pexea12 closed this as completed Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants