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

Scrollbar is rendered twice in <StrictMode>, auto value of slidesPerView not working properly #6386

Closed
5 of 6 tasks
xsjcTony opened this issue Feb 12, 2023 · 1 comment
Closed
5 of 6 tasks
Labels

Comments

@xsjcTony
Copy link

xsjcTony commented Feb 12, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://stackblitz.com/edit/vitejs-vite-kt3kug?file=src/App.tsx

Bug description

Scrollbar is rendered twice in <StrictMode>:

Please see reproduction


auto value of slidesPerView not working properly:

From my understanding, auto means it won't force each slide's width, but currently the behavior is equivalent as it's set to 1 (width: 100%). To temporarily work around this, I have to overwrite the style like this

.swiper-slide {
    width: auto !important;
}

Please also see reproduction

Expected Behavior

No response

Actual Behavior

No response

Swiper version

9.0.4

Platform/Target and Browser Versions

Chrome 108

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
@xsjcTony
Copy link
Author

@nolimits4web Really appreciate the fix for the scrollbar. But what about the slidesPerView="auto" issue? Is it expected that auto is equivalent to 1? I can't get a clear instruction in the doc on how auto should behave, but from my perspective it is definitely an issue that I have to override styles myself.

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

No branches or pull requests

1 participant