Open Sep29th opened 1 month ago
I guess it is due to the values I give when scrolling left and right, I will look into it.
I encountered the same issue after migrating my app from JS-based navigation (@react-navigation/stack
) to native navigation (@react-navigation/native-stack
). It only occurs on iOS for me and not on Android.
I looked into it and was able to fix it by putting overflow: hidden
on the view that wraps my entire page.
And I don't think this is something the library itself should fix:
To apply the same style directly in the library, it would have to wrap all the SwiperCards in a new view in the Swiper component and then hide the overflow on that. However, the cards would then no longer be able to be rendered outside of this container at all when swiping, not even on the same page. For the example app in this repo, this would mean that they could no longer be dragged behind the ActionButtons. In addition, this new view would have to be configurable/stylable by the consuming developers for full flexibility and the library would have to provide props for this.
At most, the animation could be adjusted so that the cards become invisible after they have finished swiping. Still, this would not completely prevent bleeding to another page and would also be more complex to implement.
https://github.com/user-attachments/assets/4a103767-806e-4989-9a08-e52ff393abf4