-
Notifications
You must be signed in to change notification settings - Fork 25k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
if I use expression to set initialScrollIndex value , the FlatList will not scroll to the excepted position.
//Not working.
<FlatList
data = {this.state.items}
initialScrollIndex = {this.state.items.length > 0 ? 5 : 0 }
....
/>But if I give it a value directly it will scroll to the target index.
//Working.
<FlatList
data = {this.state.items}
initialScrollIndex = {5}
....
/>Is it a bug of RN?I catch this with version 0.45.1 Android.
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.