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

FlatList scroll does not work after initialScrollIndex #20421

Closed
theasc opened this issue Jul 27, 2018 · 2 comments
Closed

FlatList scroll does not work after initialScrollIndex #20421

theasc opened this issue Jul 27, 2018 · 2 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@theasc
Copy link

theasc commented Jul 27, 2018

Environment

Environment:
OS: macOS High Sierra 10.13.6
Node: 8.10.0
Yarn: Not Found
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: Not Found

Packages: (wanted => installed)
react: ^16.3.1 => 16.3.1
react-native: ^0.55.4 => 0.55.4

Description

I work on a horizontal list with the component FlatList in the tvOS environment. The problem occurs on a small list of 3 elements, I set the initialScrollIndex equal to the second or last element, the good item is selected. However when I try to go back on a previous item the selection occurs but there is no scroll.

Reproducible Demo

  <FlatList
      getItemLayout={(data, index) => ({
         length: 300,
	 offset: 300 * index,
          index,
      })}
      initialScrollIndex={this.props.initialScrollIndex}
      keyExtractor={this._keyExtractor}
      horizontal={this.props.horizontal}
      scrollEnabled={true}
      extraData={this.state}
      ref={list => (this.myScrollView = list)}
      data={this.finalData}
      removeClippedSubviews={false}
      renderItem={this.props.renderRow}
  />
@react-native-bot
Copy link
Collaborator

Have you been able to reproduce this on the latest release, 0.56?

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Aug 17, 2018
@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@facebook facebook locked as resolved and limited conversation to collaborators Aug 17, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants