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

Update the clones as well as the "normal" slides #662

Open
IKIKN opened this issue Jun 1, 2023 · 2 comments
Open

Update the clones as well as the "normal" slides #662

IKIKN opened this issue Jun 1, 2023 · 2 comments

Comments

@IKIKN
Copy link

IKIKN commented Jun 1, 2023

Hi,

I'm using the library to display slides that are sometimes being updated (for instance, the text inside it is changed).

It works well, except with the clones that are not being updated (they still contain the "old" text), so when I go to the last slide, then directly to the first, the old slide (the clone actually) is briefly visible before the updated slide.

Is there a way to avoid this behaviour?

Thanks!

@Uliana97
Copy link

Uliana97 commented Nov 7, 2023

Hi, we are having the same issue with carousel clones, the styling of the clone is different when I go from the last slide to the first, so it causes some weird content jumping when the original item is shown after..

Can anyone provide us with any information?

@leopacciulli
Copy link

@IKIKN @Uliana97 Fixed it by adding the destroy method of the Glide instance when unmount:

if (glideInstanceRef.current) {
   glideInstanceRef.current.destroy()
}

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