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

events & callback #50

Open
M-Barari opened this issue Jul 7, 2020 · 4 comments
Open

events & callback #50

M-Barari opened this issue Jul 7, 2020 · 4 comments

Comments

@M-Barari
Copy link

M-Barari commented Jul 7, 2020

Hi, i'm new on all of these so i need help. first of all how this events work to begin with. you just listed them without use examples.
And second and more important, i wanna send an axios request at the end of my carousel and load more items. i couldn't work with events so used active slide and watched it and on last slide sent and updated my data but slide still shows the previous one. what should i do?

@iniakunhuda
Copy link

Hi, I hope this can help you

<vue-glide @glide:build-after="functionName" @glide:run-after="functionName"></vue-glide>

@M-Barari
Copy link
Author

M-Barari commented Aug 20, 2020

@iniakunhuda thank you! yeah it helped a lot! which got me to my main problem! at end of carousel i call an axios and append to the data that glide is showing. but it wont show the new ones! i kinda know that it has something to do with vue-glide being client side rendered.
What should i do? i hope i dont have to destroy it, but if i have to, how!!?

@aubriehill
Copy link

aubriehill commented Sep 4, 2020

hey @M-Barari! I just ran into a similar issue, you can force the vue component to refresh. I followed this https://michaelnthiessen.com/force-re-render/ and added a key to vue-glide component that I change when glide needs to update and make sure it has the correct amount of slides. Hope that helps!

@M-Barari
Copy link
Author

M-Barari commented Nov 2, 2020

@aubriehill , tanx. yeah , I came up with the same solution (to reload component with key change) , but unfortunately i have image on my glide and on reload it loads images again and it looks like the whole carousel is loading not appending (as it is). but if there is no image every thing is nice and smooth

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