react-native-draggable-flatlist
react-native-draggable-flatlist copied to clipboard
[RTL][Android][Horizontal] Odd behaviour while dragging
Describe the bug
Odd behaviour while dragging on RTL as seen in gif below (Android device):
To Reproduce list:
<DraggableFlatList
ref={ref}
horizontal={true}
data={images}
renderItem={renderItem}
onDragEnd={onDragEnd}
contentContainerStyle={{
flexGrow: 1,
flexDirection: 'row',
}}
initialScrollIndex={0}
keyExtractor={item => item.id}
/>
renderItem:
const renderItem = ({item, drag, index, isActive}) => {
return (
<TouchableOpacity key={item.id}
disabled={isActive}
onLongPress={drag}>
<!-- content -->
</TouchableOpacity>
);
}
enabling rtl on app start:
I18nManager.allowRTL(true);
I18nManager.forceRTL(true);
Platform & Dependencies
- react-native-draggable-flatlist version: 3.0.3
- Platform: Android 11 (emulator)
- React Native or Expo version: RN 0.66.2
- Reanimated version: 2.3.1
- React Native Gesture Handler version: 2.1.0
Weird! This looks like an issue with RN flatlist: https://github.com/facebook/react-native/issues/19150