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

Make slidesPerViewDynamic Public #7036

Closed
3 of 4 tasks
txm3278 opened this issue Sep 15, 2023 · 1 comment
Closed
3 of 4 tasks

Make slidesPerViewDynamic Public #7036

txm3278 opened this issue Sep 15, 2023 · 1 comment

Comments

@txm3278
Copy link

txm3278 commented Sep 15, 2023

Clear and concise description of the problem

As a develop using Swiper I want to be able to programmatically slide to the group of a selected slide. For example, if the selected slide is the third slide and is currently visible, there should be no sliding. If the selected slide is the seventh slide and is not visible or is only partially visible, the swiper should be able to slide to the group that the slide is in. When using slidePerView "auto" and slidesPerGroupAuto, there is no current way to find out how many slides are in a group.

Suggested solution

Make slidesPerViewDynamic public so developers can see how many slides are in a group and can navigate accordingly.

Alternative

An option like initialSlide, that makes the group of the selectedSlide visible.

Additional context

No response

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.

Would you like to open a PR for this feature?

  • I'm willing to open a PR
@txm3278
Copy link
Author

txm3278 commented Sep 15, 2023

As a side note, it seems like watchSlidesProgress and slidesPerGroupAuto calculate which slides are currently visible differently. I prefer the way slidesPerGroupAuto does it in this case

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

No branches or pull requests

1 participant