Closed tmcgann closed 3 years ago
@tmcgann Hi, thanks for the feedback! You're right, events should be only triggered for the respective carousel and not for all of them. My bad; when you can, please update to the latest version - 1.9.1
- issue should be fixed now. Let me know :)
@Emiliano-Bucci All fixed up in 1.9.5
! Thanks! Keep up the great work!
Situation: I have two custom carousel components that render on the same page. The components are completely independent and execute
useSpringCarousel
separately. The second carousel further down the page leveragesuseListenToCustomEvent
to track when theonSlideStartChange
event fires so that it can change some state in its component.Problem: When I use
slideToPrevItem
orslideToNextItem
in the first component, it causesonSlideStartChange
to fire in the second component. I assume the event fires for any/all carousels. However, I did NOT expect this. I would expect the events to only fire for the respective components, NOT all components.