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
As the title states, I am trying to display my images inside the carousel and the carousel itself is the renderItem of the Flatlist. Any help would be appreciated ASAP.
Reproduction
1- Create a Flatlist from react-native and an array of objects containing {id,caption,mediaUrls}
2- Inside the renderItem function of the Flatlist create a Carousel component with its data being the mediaUrls of the data fed into the Flatlist.
3- Run the app on android. You will see that images are not displayed. Only the caption is there.
Describe the bug
As you can see I'm trying to display the images inside the carousel which is part of a flatlist but the images don't display.
Expected behavior
The screen should display a Flatlist of posts which contain the images inside a carousel.
Screenshots
Versions:
react: v18.2.0
react-native: v0.74.5
react-native-reanimated: v3.10.1
react-native-reanimated-carousel: v4.0.0-alpha.12
react-native-gesture-handler: v2.16.1
The text was updated successfully, but these errors were encountered:
Hey there, @M-Affan283! I'm here to help you with your code issues and questions. Let's take a look at what's going on with your carousel and get it sorted out.
When using react-native-reanimated-carousel inside a FlatList, there is a known issue where the carousel can suppress the scroll gesture handler of the FlatList. To address this, you can adjust the activeOffsetX of the gesture handler to ensure that the unused axis does not impede the scroll of the list. You can do this by using the onConfigurePanGesture prop of the Carousel component. Here's how you can modify your code:
As the title states, I am trying to display my images inside the carousel and the carousel itself is the renderItem of the Flatlist. Any help would be appreciated ASAP.
Reproduction
1- Create a Flatlist from react-native and an array of objects containing {id,caption,mediaUrls}
2- Inside the renderItem function of the Flatlist create a Carousel component with its data being the mediaUrls of the data fed into the Flatlist.
3- Run the app on android. You will see that images are not displayed. Only the caption is there.
Describe the bug
As you can see I'm trying to display the images inside the carousel which is part of a flatlist but the images don't display.
Expected behavior
The screen should display a Flatlist of posts which contain the images inside a carousel.
Screenshots
Versions:
The text was updated successfully, but these errors were encountered: