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

Destroy hook is called before transition finishes #80

Open
2 tasks done
antonisntoulis opened this issue Jan 21, 2023 · 2 comments · May be fixed by #97
Open
2 tasks done

Destroy hook is called before transition finishes #80

antonisntoulis opened this issue Jan 21, 2023 · 2 comments · May be fixed by #97
Labels
bug Something isn't working

Comments

@antonisntoulis
Copy link

Checks

Version

0.6.12

Description

Vue 3 built-in unMounted/beforeUnmount hooks get called before transitions have ended and it's sadly the expected behaviour.

Splide calls the destroy() method on its instance when the vue beforeUnmount hook gets called.

When we have a transition on our pages we can see the splide get destroyed(slides suddently lose styling ,positioning etc) before the page has finished transitioning and this is not ideal at all.

Reproduction Link

No response

Steps to Reproduce

  1. Create a vue app with router
  2. Have at least two pages with transitions
  3. Put a splide on one of the pages
  4. Navigate from the page with the splide to another one
    ...

Expected Behaviour

Splide should wait for the transitions to end before destroying.

@antonisntoulis antonisntoulis added the bug Something isn't working label Jan 21, 2023
@doutatsu doutatsu linked a pull request Sep 21, 2023 that will close this issue
@doutatsu
Copy link

I've gone ahead and made a simple PR to address this issue, as I have the same issue. Providing an option to delay destroy action allows us to wait for the transition to end before destroying the carousel. Hope @NaotoshiFujita takes a look 🖖🏻

@ThornWalli
Copy link

@NaotoshiFujita What is the current status here?

Any kind of Vue transition causes problems...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants