question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support sticky header for scroll view

See original GitHub issue

React native supports stickyHeaderIndices for scroll view.

When <view scroll="true"> we can support multiple <sticky-header target="..." /> as children where target attribute references the view we want to make sticky.

Example

        <view scroll="true">
          <sticky-header target="view-1" />
          <sticky-header target="view-3" />
          <view id="view-0">
            <text style="Text">Non Sticky</text>
          </view>
          <view id="view-1">
            <text style="Text">Sticky</text>
          </view>
          <view id="view-2">
            <text style="Text">Non Sticky</text>
          </view>
          <view id="view-3">
            <text style="Text">Sticky</text>
          </view>
        </view>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
flochtililochcommented, Feb 7, 2022

Regarding the <section-list> sticky header behavior, it’s enabled by default on iOS and disabled by default on Android. It does not look like we provide an explicit way to set/unset (via stickySectionHeadersEnabled), we should probably expose this.

0reactions
palaparthicommented, Feb 7, 2022

@flochtililoch thanks for catching that, I think contacts are using <list> instead of <section-list>, will look into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using React Native ScrollView to create a sticky header
Create a custom sticky header with React Native ScrollView that shrinks, expands, and changes color on scroll to enhance your app's UX.
Read more >
Sticky Component inside scrollview - react native
It is very simple with ScrollView component. There is already something called "stickyHeaderIndices" which takes the index of child to make sticky.
Read more >
Fixed header with scroll view - Expo Snack
import { Text, View, StyleSheet,. ScrollView } from 'react-native';. let CreateLongList = () => {. let arr = []; ... const HeaderHeight =...
Read more >
Sticky Headers for Scroll Views - Swift Talk - objc.io
We implement a sticky modifier that makes views in a scroll stick to the top.
Read more >
SwiftUI — ScrollView Sticky Header Tutorial - Level Up Coding
Quick SwiftUI Tutorial on how to implement a sticky header at the top of your ScrollView. Use it with images and other custom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found