Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initialScrollIndex bug #14591

Closed
Symous opened this issue Jun 19, 2017 · 1 comment
Closed

initialScrollIndex bug #14591

Symous opened this issue Jun 19, 2017 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Symous
Copy link

Symous commented Jun 19, 2017

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.

@hramos
Copy link
Contributor

hramos commented Jun 19, 2017

This issue looks like a question that would be best asked on StackOverflow.

StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

Will close this as this is really a question that should be asked on StackOverflow.

@hramos hramos closed this as completed Jun 19, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jun 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants