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

refactor(element): use swiper state for init/destroy tracking #7907

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eduardobattisti
Copy link
Contributor

If approved, this PR:

  • Uses swiper state to define the initialization/destroy behavior. Using the state defined in the web component was not reflected, because the initialize and destroy methods only update the swiper instance state.

In the case of disconnectedCallback. Only will it be triggered if the component is removed from the DOM.

Fixes: #7666

@eduardobattisti
Copy link
Contributor Author

eduardobattisti commented Feb 23, 2025

I noticed that most of the codebase does not use optional chaining, so I presumed that it is a coding standard. If necessary, I can update this code to use it.

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

Successfully merging this pull request may close these issues.

Swiper Element - Unable to Reinitialize After Destroying
1 participant