swiper
swiper copied to clipboard
Solid doesn't work with dynamic slides
Check that this is really a bug
- [X] I confirm
Reproduction link
https://codesandbox.io/s/swiper-default-solid-forked-74lqi1?file=/src/App.jsx
Bug description
I've got Swiper working with Slides that are generated in place, but anytime the slides are generated from data/dynamically, they just don't get loaded. I've ported this instance from an existing React app, where it was working great.
I've even tried putting in all the observer flags, and calling all the various update functions after the data is populated:
swiper.update();
swiper.updateSlides();
swiper.updateSize();
but it still won't show any slides.
Oddly enough, re-saving the file while in dev mode will show the slides, I'm assuming because hot reloading reloads everything, and now the slides are 'there', instead of delayed because of data loading etc.
Expected Behavior
Swiper slides should show up/refresh like the other framework counterparts.
Actual Behavior
Swiper stays blank and reports no slides.
Swiper version
8.3.2
Platform/Target and Browser Versions
all
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- [X] 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