Flatlist not supported for RTL
See original GitHub issue- I have reviewed the documentation
- I have searched existing issues
- I am using the latest React Native version
<Flatlist> horizontal true component does not work properly on Rtl devices, it renders the items again and jumps to head of list. impossible to use
Environment
Environment: OS: macOS High Sierra 10.13.4 Node: 8.2.1 Yarn: 1.3.2 npm: 5.5.1 Watchman: 4.7.0 Xcode: Xcode 9.3 Build version 9E145 Android Studio: 3.1 AI-173.4670197
Packages: (wanted => installed) react: 16.3.2 => 16.3.2 react-native: 0.55.0 => 0.55.0
Steps to Reproduce
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
FlatList,
I18nManager
} from 'react-native';
const getList = () => {
let list = []
for (i=0;i<100;i++)
list.push({title:i,backgroundColor:getRandomColor()})
return list
}
export default class AutoLinkDemo extends Component {
constructor(props){
super(props)
this.state={
data:getList()
}
}
render() {
return (
<View style={styles.container}>
<Text style={{fontWeight:'bold',fontSize:60}}>{`is RTL? ${I18nManager.isRTL}`}</Text>
<View style={styles.list}>
<FlatList
data={this.state.data}
contentContainerStyle={{alignItems:'center', justifyContent:'center'}}
renderItem={({ item }) => this.renderCardItem(item)}
keyExtractor={(item, index) => index}
horizontal
/>
</View>
</View>
)
}
renderCardItem(item){
return(
<View style={[styles.cardItem,{backgroundColor:item.backgroundColor}]}>
<Text style={{fontWeight:'bold',fontSize:40}}>{item.title}</Text>
</View>
)
}
}
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F5FCFF',
alignItems:'center', justifyContent:'center',
},
list: {
height:250,
backgroundColor: 'yellow',
alignItems:'center', justifyContent:'center',
},
cardItem:{
height:200,
width:250,
alignItems:'center',
justifyContent:'center',
margin:5,
},
});
AppRegistry.registerComponent('AutoLinkDemo', () => AutoLinkDemo);
Expected Behavior
<Flat list should adopt to relevant direction as I18nManager.isRtl` returns
Actual Behavior
<Flatlist> horizontal true component does not work properly on Rtl devices, it renders the items again and jumps to head of list. impossible to use
if i add attribute legacyImplementation={true} it works fine but as said in documents i doent know what traits of Flatlist i loose.

Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:63 (11 by maintainers)
Top Related StackOverflow Question
30 years later : hey react native the issue still exits any luck , it has been open for 30 years now
adding
inverted={true}just worked for me:<FlatList inverted={true} horizontal={true} />