You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use loop property on Swiper React component inside a hidden container (with display: none CSS property), my app crashes due to Cannot read properties of undefined (reading 'swiperSlideSize') error. Turning the loop property off makes the error go away.
Expected Behavior
Be able to visually hide a carousel with loop property turned on
I'm not sure the approach to solve my problem is correct in general. I want to have different loop and autoplay behaviour for mobile and desktop and since my attempts to achieve that with breakpoints property failed, I'm just trying to display two different instances of my carousel using CSS. I'd like to hear your opinion about this as well!
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/swiper-react-centered-auto-forked-hpcwzz
Bug description
When I try to use
loop
property onSwiper
React component inside a hidden container (withdisplay: none
CSS property), my app crashes due toCannot read properties of undefined (reading 'swiperSlideSize')
error. Turning theloop
property off makes the error go away.Expected Behavior
Be able to visually hide a carousel with
loop
property turned onActual Behavior
No response
Swiper version
9.3.2
Platform/Target and Browser Versions
macOS Chrome Version 113.0.5672.126
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: