0

Horizo​​ntal FlatList がありますが、電話の言語をアラビア語 (RTL) に変更しました。scrollToIndex() は RTL では機能しません。RTL がなくても期待どおりに機能します。助言がありますか?

フラットリスト

<FlatList
    style={myStyles.flatListStyle}
    horizontal={true}
    data={this.props.dataForFlatList}
    renderItem={this.renderItem}
    ref={(ref) => { this.flatListRef = ref; }}
    keyExtractor={item => item.id.toString()} />

Press() の renderItem 関数はアイテム ID を渡しています

this.flatListRef.scrollToIndex({ animated: true, index: id }); // Working fine without RTL - NOT WORKING WITH RTL

前もって感謝します。

4

1 に答える 1