Thumbnail listeners doesn't work if rendered in array
multipliedtwice opened this issue · 1 comments
multipliedtwice commented
Checks
- Not a duplicate.
- Not a question, feature request, or anything other than a bug report directly related to Svelte Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions
Version
0.2.5
Description
Hello, thank you for an awesome library. Not sure if it's a question or bug report. I trying to make a product listing with sliders and thumbnails by following your example from the repo.
Slider thumbnails don't work except for ones in the last iteration of the loop.
Reproduction Link
https://codesandbox.io/s/naughty-ptolemy-owfpb0?file=/App.svelte
Steps to Reproduce
- Try to click thumbnails in the sandbox
Expected Behaviour
Click on thumbnail changes slides
NaotoshiFujita commented
Close this since this is not a splide bug.
You iterate over main and thumnail carousels 6 times with same main
and thumbs
variables. That's why only the last one works.
You need to call sync
for each pair (6 times).