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

How can I convert ListHeaderComponent to sticky header? #1019

Closed
bloggerklik opened this issue Jan 13, 2024 · 6 comments
Closed

How can I convert ListHeaderComponent to sticky header? #1019

bloggerklik opened this issue Jan 13, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@bloggerklik
Copy link

bloggerklik commented Jan 13, 2024

I have a component in ListHeaderComponent. I want to convert this into a sticky header. How can I do it? In FlatList, it is sufficient to give stickyHeaderIndices={[0]}. But this does not work in FlashList.

            <FlatList
                stickyHeaderIndices={[0]}
                ListHeaderComponent={ <Header/> }
            />
@bloggerklik bloggerklik added the bug Something isn't working label Jan 13, 2024
@SashaYursa
Copy link

+1

@Randall71
Copy link
Contributor

check this page of the doc as an inspiration : https://shopify.github.io/flash-list/docs/guides/section-list

@naqvitalha
Copy link
Collaborator

Just make it first item of the list instead. Not following FlatList here was intentional and we don't plan on changing that.

@jayan2019
Copy link

@naqvitalha is this applicable for MasonryFlashList also?
Or is there any option to make sticky header for MasonryFlashList?

@mustafaabobakr
Copy link

Why is this closed ?

Flatlist ✅ Flashlist ❌
Flatlist.-.sticky.header.mp4
Flashlist.-.BUG.sticky.header.not.working.mp4

@WillyRamirez
Copy link

@naqvitalha

Just make it first item of the list instead. Not following FlatList here was intentional and we don't plan on changing that.

How would this work exactly if numColumns is greater than 1? My ListHeaderComponent has the full width of the list and by making it the first item it's treated as if it should fit in a column...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants