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

[Swiper Element] pagination container [part] attribute is missing after delayed pagination initialization #6940

Closed
5 of 6 tasks
Maximaximum opened this issue Aug 17, 2023 · 2 comments

Comments

@Maximaximum
Copy link
Contributor

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-pagination-forked-lm48kq?file=%2Findex.html%3A40%2C22

Bug description

If pagination is initialized via:

  • swiper.pagination property (like document.querySelector("swiper-container").pagination = true;)
    or
  • setAttribute() method (like document.querySelector("swiper-container").setAttribute("pagination", true)),

the [part] attribute is missing on the pagination container.

This is inconsistent with what happens if pagination is initialized during swiper creation (via <swiper-container pagination="true"></swiper-container>)

NOTE: This seems to be a purely Swiper Element bug, not a Swiper Core one. However, there is no github bug template for Swiper Element bugs.

Expected Behavior

Pagination container should look like:

<div part="pagination" class="swiper-pagination swiper-pagination-bullets swiper-pagination-horizontal"></div>

Actual Behavior

Pagination container looks like:

<div class="swiper-pagination swiper-pagination-bullets swiper-pagination-horizontal"></div>

Swiper version

10.1.0

Platform/Target and Browser Versions

Windows Chrome v116

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@nolimits4web
Copy link
Owner

Please do search previous issues before posting new one

@Maximaximum
Copy link
Contributor Author

#6899

Indeed, didn't notice that one, sorry. 😅

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

2 participants