Skip to content

the scrollToEnd / scrollToOffset methods of FlatList execute unexpected if set ListHeaderComponent prop #15804

Closed
@kid-wumeng

Description

Hi, good people... thanks your contributions for react-native, the amazing framework.

Now... I happen the issue, very headache...

react-native version: 0.47.1

Example, render the FlatList like this:

<FlatList
  ref="flatlist"
  ListHeaderComponent={one header component...}
/>

Maybe, the header component has a height such as 300.

When i execute scrollToEnd methods, i hope the list scroll to end, and the scroll distance should includes the header height (now 300).

But, it will scroll unexpected. the list will scroll to an uncertain position.

Based on my observation, it seemingly did not computed and included the header height.

Whether this is a bug or not ? How can i solve it in current version ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions