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
Hello, I have abstracted Swiper into a compound component called Carousel with CarouselItem but I found my CarouselItem component doesn't work correctly due to the logic in the isChildSwiperSlide function:
Current Solution: An obvious way to deal with this would be to set CarouselItem.displayName = "CarouselItem_SwiperSlide" to make it compatible with the validation by including 'SwiperSlide'. However, this approach might break in the future with updates.
Discussion: I would like to check if there are any plans or current alternatives to make the isChildSwiperSlide function more flexible. Perhaps allow a custom validation function passed as an argument to the root component, or a custom property to check?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello, I have abstracted Swiper into a compound component called Carousel with CarouselItem but I found my CarouselItem component doesn't work correctly due to the logic in the isChildSwiperSlide function:
In the example below, SwiperSlide works, but CarouselItem is ignored because the displayName does not match.
Current Solution: An obvious way to deal with this would be to set CarouselItem.displayName = "CarouselItem_SwiperSlide" to make it compatible with the validation by including 'SwiperSlide'. However, this approach might break in the future with updates.
Discussion: I would like to check if there are any plans or current alternatives to make the isChildSwiperSlide function more flexible. Perhaps allow a custom validation function passed as an argument to the root component, or a custom property to check?
Thanks!
The text was updated successfully, but these errors were encountered: