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

cannot access flickity via this.$refs #52

Open
andersaamodt opened this issue Oct 4, 2019 · 1 comment
Open

cannot access flickity via this.$refs #52

andersaamodt opened this issue Oct 4, 2019 · 1 comment

Comments

@andersaamodt
Copy link

I added a ref="flickity" property to my component, but it is not accessible via this.$refs.flickity, even in the mounted() function. I tried suggestions from this thread and this thread but nothing worked. Does anyone know why this is happening?

@paullacour
Copy link

@andersaamodt I had the same issue, I wanted to access the selectedIndex in this.$refs.flickity and it was undefined even in mounted() cycle. So I followed @Yakoot advice in #45 and it worked... onInit(){ this.$refs.flickity.on('change', (index) => { console.log(index) }) }

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

2 participants