Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

keep component alive during page transition #388

Closed
wants to merge 1 commit into from

Conversation

guins
Copy link

@guins guins commented Jul 23, 2018

Hello, I added a cleanStylesOnDestroy props, so we can prevent the component from cleaning Swiper styles during the beforeDestroy lifecycle event. Indeed the beforeDestroy event is emitted right away when a component should be removed, even if the component (or one of its parents) have a transition out animation. So this allows you to keep the component alive, and properly styled, during a page transition.

@hoektoe
Copy link

hoektoe commented Jul 24, 2018

@guins is the owner of this repo still alive? He hasn't done any commits in past 3 months

@hoektoe
Copy link

hoektoe commented Aug 21, 2018

@surmon-china can we get some love for this project and pull-request

@maximelebreton
Copy link

maximelebreton commented Sep 8, 2018

To get working, don't forget to set :cleanStylesOnDestroy prop to false

<swiper :cleanStylesOnDestroy="false" ref="mySwiper"></swiper>

Thanks @guins for the fix!

DarkRiDDeR added a commit to DarkRiDDeR/vue-swiper-ave2 that referenced this pull request Apr 30, 2019
@surmon-china
Copy link
Owner

Thanks!

v4.0.0 new feature:

<swiper :options="options" :auto-destroy="false">

@surmon-china surmon-china changed the base branch from master to swiper5 March 12, 2020 18:20
@surmon-china surmon-china mentioned this pull request Mar 19, 2020
@surmon-china
Copy link
Owner

Merged! here, enjoy it!

@hoektoe
Copy link

hoektoe commented Dec 8, 2020

Thank you busy updating our packages at the moment. appreciated this @surmon-china

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants