javascript - how to implement multiple scrollable sticky headers in react native - Stack Overflow

Please see below video on what I am trying to achieve, I have a screens with multiple Flatlists with Da

Please see below video on what I am trying to achieve, I have a screens with multiple Flatlists with Data and other items, I want each header to stick as users is scrolling through different sections. I have tried using stickyheaders props that es with React Native flatlist but that only works for one flatlist, I am looking for a solution that takes care of multiple sticky headers.

Thanks

Please see below video on what I am trying to achieve, I have a screens with multiple Flatlists with Data and other items, I want each header to stick as users is scrolling through different sections. I have tried using stickyheaders props that es with React Native flatlist but that only works for one flatlist, I am looking for a solution that takes care of multiple sticky headers.

Thanks

Share Improve this question edited Apr 22, 2021 at 6:17 Shadow_net asked Apr 20, 2021 at 6:58 Shadow_netShadow_net 3011 gold badge5 silver badges11 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

You have to use single flatlist in a screen to acheive this, there is a ListHeaderComponent and ListFooterComponent in flatlist, you can try adding items in header

ScrollView/Flatlist has a property stickyHeaderIndices, you can give values for example stickyHeaderIndices={[0,3,5]}

in this example scroll, first item will stop, then 3rd then 5,

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745580146a4634205.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信