-
Notifications
You must be signed in to change notification settings - Fork 55
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
How to use Flickity Events? #45
Comments
Try
Otherwise just console.log this.$refs to see how your component is named. This works for me with every event besides the "ready" Event. I don't see why it's not triggered, so if anybody has an idea, please let me know. |
If I wrap the event listener in a timeout I don't get the error.
|
The ready event still doesn't get triggered for me |
Yeah, when I console my refs I can see flickity object, but when I’m trying
to call .on event it callback an error I told you before. Any ideas?
ср, 21 нояб. 2018 г. в 17:03, nikwins <[email protected]>:
… Try
this.$refs.flickity.on('select', function () {
console.log(vm.$refs.flickity.selectedIndex()); });
Otherwise just console.log this.$refs to see how your component is named
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AosBy7efKmmqShYU4SVo8PIqn8iPo54nks5uxRbbgaJpZM4Ysd_1>
.
|
YEAH!!! IT WORKS!! THANKS |
Use the |
I get |
That's weird. Could you create a reproduction on codesandbox? I would be interested in finding out what's causing it. You are immediately rendering it inside a component, right? |
After starting to set this up on codesandbox I remembered that I adapted I expect it's either a change in Thanks for your suggestions so far and writing the component in the first place 🙌 |
and then you can bind your events in onInit method |
Is there a sample solution for event listening with Vue 3 & TypeScript? |
Solution for Vue 3 & Typescript event listening here |
Could you tell me how to use events API of Flickity?
This code doesnt work.
I get the error "Cannot read property 'on' of undefined"
The text was updated successfully, but these errors were encountered: