meliorence / react-native-snap-carousel

Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
BSD 3-Clause "New" or "Revised" License
10.37k stars 2.29k forks source link

RTL issue in react native 0.74 #1029

Open mina4gerges opened 4 months ago

mina4gerges commented 4 months ago

Hello I am facing an issue in RTL version where the scroll to an item is not working properly and getting the below warning:

scrollToOffset may not be called in RTL before content is laid out

tkyr-hh commented 3 months ago

@mina4gerges can you please add this prop to your carousel :

useScrollView={I18nManager.isRTL ? true : false}

jobberma commented 3 months ago

@mina4gerges can you please add this prop to your carousel :

useScrollView={I18nManager.isRTL ? true : false}

In IOS, images loose opacity when swiping in RTL. Did you face that ?

Hady207 commented 2 months ago

@jobberma Im Also facing the same issue

jobberma commented 2 months ago

@jobberma Im Also facing the same issue

Did you find a solution ?

tkyr-hh commented 2 months ago

@mina4gerges can you please add this prop to your carousel : useScrollView={I18nManager.isRTL ? true : false}

In IOS, images loose opacity when swiping in RTL. Did you face that ?

@jobberma can you please show us what you've got?

vanhai989 commented 2 months ago

@mina4gerges can you please add this prop to your carousel : useScrollView={I18nManager.isRTL ? true : false}

In IOS, images loose opacity when swiping in RTL. Did you face that ?

@jobberma can you please show us what you've got?

I just wanted to let you know that it works for me. thank you

jobberma commented 2 months ago

@mina4gerges can you please add this prop to your carousel : useScrollView={I18nManager.isRTL ? true : false}

In IOS, images loose opacity when swiping in RTL. Did you face that ?

@jobberma can you please show us what you've got? cdd32ba5-52a8-4804-a288-982eb8fda47c

Hady207 commented 2 months ago

@jobberma Im Also facing the same issue

Did you find a solution ?

i switched to react-native-reanimated-carousel, and work fine for me

seemed reasonable to switch as i don't think this package is maintained anymore.

AyoubXwire commented 1 month ago

@mina4gerges can you please add this prop to your carousel : useScrollView={I18nManager.isRTL ? true : false}

In IOS, images loose opacity when swiping in RTL. Did you face that ?

the elements will lose opacity and size, because they are not correctly set as active items, so they get the inactiveSlideOpacity & inactiveSlideScale props applied to them. if you set both the props to 1, you visual issue will be solved, but still the active slide won't be correctly set but I don't think thats problematic in your case