Skip to content

Fix for jumpy rendering of VirtualList with initialScrollIndex prop specified #18104

@rbrosboel

Description

@rbrosboel

Is this a bug report?

Yes. Pull request will follow.

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: Windows 10
Node: 8.9.4
Yarn: Not Found
npm: 4.6.1
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.0.0.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz => 0.52.0

Steps to Reproduce

See snack: https://snack.expo.io/Sy_bHbM_z

  1. Render SectionList, with initialScrollIndex prop specified
  2. Watch how list items jump between first/second rendering

Expected Behavior

List items would render at a consistent position.

Actual Behavior

VirtualizedList with initialScrollIndex specified renders content in different positions for the first/second rendering, causing a noticable jump of the list items.

Reproducible Demo

https://snack.expo.io/Sy_bHbM_z

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution: PR SubmittedA pull request with a fix has been provided.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