Skip to content

[Bug][SwipeableFlatList] First item not updated for the first time. Second, third... OK #16685

@kesha-antonov

Description

@kesha-antonov

Hello!

If you pass updated data to SwipeableFlatList for the first time - item at index 0 will not be updated. On second, third etc. item updated as expected.

Also if you pass updated data to SwipeableFlatList for the first time item at index higher than 0 they'll be updated as expected.

Some weird bug.

For now I just update data 2 times at one time just to be sure.

Is this a bug report?

Yes.

Have you read the Contributing Guidelines?

Yes.

Environment

Environment:
  OS: macOS High Sierra 10.13
  Node: 6.11.3
  Yarn: 1.3.2
  npm: 5.4.2
  Watchman: 4.9.0
  Xcode: Xcode 9.0 Build version 9A235
  Android Studio: 3.0 AI-171.4408382

Packages: (wanted => installed)
  react: 16.0.0 => 16.0.0
  react-native: github:kesha-antonov/react-native#master_with_videos_5_11_2017 => 1000.0.0

Steps to Reproduce

  1. Create SwipeableFlatList with 2 items
<SwipeableFlatList
  data={this.props.data}
  renderItem={this.renderItem}
  keyExtractor={this.keyExtractor}
/>
  1. Pass updated data with updated only first item to List
  2. See no updates

Expected Behavior

First item should be updated.

Actual Behavior

First item not updated.

Reproducible Demo

Tried to reproduce with Snack but SwipeableFlatList is not on npm yet?
https://snack.expo.io/BJnvHq3AZ?session_id=snack-session-BJxUFSchRW

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions