-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Virtual slides ignore initialSlide in the beginning #7353
Closed
5 of 6 tasks
m345054 opened this issue
Mar 5, 2024
· 5 comments
· Fixed by Mapuppy09/tradetrust-website#8 · May be fixed by heliumtank92/am92-react-design-system#10, aswanthchandran0/eccomerce#4 or akashkumar8115/AspireNex_web-scraping-ecommerce-websites-#4
Closed
5 of 6 tasks
Virtual slides ignore initialSlide in the beginning #7353
m345054 opened this issue
Mar 5, 2024
· 5 comments
· Fixed by Mapuppy09/tradetrust-website#8 · May be fixed by heliumtank92/am92-react-design-system#10, aswanthchandran0/eccomerce#4 or akashkumar8115/AspireNex_web-scraping-ecommerce-websites-#4
Labels
t0ggles
Linked to the t0ggles task
Comments
t0ggles-create swiper |
Task nolimits4web/SWIPER-72 was created |
Task nolimits4web/SWIPER-72 status changed to Done |
@nolimits4web This doesn't work with React. |
I'm also using react and have the same issue |
This was referenced Jun 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check that this is really a bug
Reproduction link
https://jsfiddle.net/bqv2137n/11/
Bug description
When using initialSlide setting together with virtual, there is extra computing happening. Despite the value of initialSlide, Swiper currently always calls renderSlide with 0&1 indexes before rendering initialSlide slide. This is costly, when my createSlide() function is heavy.
--
Copied from #2755
This error still exists in v11.0.7
Expected Behavior
Console Output:
Slide 4
Slide 5
Slide 6
Actual Behavior
Console Output:
Slide 0
Slide 1
Slide 4
Slide 5
Slide 6
Swiper version
v11.0.7
Platform/Target and Browser Versions
Windows, Chrome
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: