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

[SectionList] stickyHeaderIndices doesn't stick the list header component #30108

Closed
IoanaBdn opened this issue Oct 5, 2020 · 6 comments
Closed
Labels
Component: SectionList Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@IoanaBdn
Copy link

IoanaBdn commented Oct 5, 2020

Description

The SectionList component does have a prop called stickyHeaderIndices that says that do that:

An array of child indices determining which children get docked to the top of the screen when scrolling. For example, passing stickyHeaderIndices={[0]} will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction with horizontal={true}.

But it seems like is doing nothing from what it's says to do. I tryed to used ListHeaderComponent to render the section list header and expected to dock it by using stickyHeaderIndices={[0]}.

Reproduction Steps and Sample Code

Snack: https://snack.expo.io/@ioanab/sticky-horizontal-menu-

Additional Information

  • react-native-cli: 2.0.1

  • react-native: 0.63.2

  • Platform: both

Environment Information

System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Memory: 196.19 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.17.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 12.0.1/12A7300 - /usr/bin/xcodebuild
  Languages:
    Java: 13.0.2 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
  npmGlobalPackages:
    *react-native*: Not Found
@react-native-bot react-native-bot added Component: SectionList Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels Oct 5, 2020
@github-actions
Copy link

github-actions bot commented Oct 5, 2020

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@lunaleaps
Copy link
Contributor

@IoanaBdn I see that the stickyHeaderIndices is on ListView rather than SectionList which might be why it's not working. Have you tried using a ListView instead?

@fengbujue2022
Copy link

fengbujue2022 commented Apr 24, 2022

same issue while use ScrollView with horizontal={true} , stickyHeaderIndices property does not working.

@github-actions
Copy link

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 16, 2023
@github-actions
Copy link

This issue was closed because the author hasn't provided the requested feedback after 7 days.

@fukemy
Copy link

fukemy commented Nov 3, 2023

any solution now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: SectionList Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants