Coder Social home page Coder Social logo

iyegoroff / react-native-collapsible-header-views Goto Github PK

View Code? Open in Web Editor NEW
195.0 195.0 22.0 14.53 MB

ScrollView, FlatList, SectionList with collapsible headers + HOC for wrapping custom scrollables

License: MIT License

TypeScript 69.24% Java 4.06% JavaScript 4.69% Objective-C 5.49% F# 11.63% Starlark 4.89%
collapsible header react-native

react-native-collapsible-header-views's People

Contributors

dependabot[bot] avatar iyegoroff avatar muhamad-rizki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-collapsible-header-views's Issues

get current height of header

hello there,
i am trying to fire an event when header is collapsed is there any way to get header height of and event that tells if header is collapsed or visible

Support contentContainerStyle paddingTop

Currently, contentContainerStyle's paddingTop is overriden by header's height.

I suggest either:

  • Add a new prop, such as extraPaddingTop which will be added to headerHeight to infer top padding
  • Use Stylesheet.flatten to evaluate if user provided a paddingTop, and add this padding top toheaderHeight to infer top padding.

scrollTo is undefined

I need use function scrollTo [https://reactnative.dev/docs/scrollview#scrollto] but this value is undefined.

example of the code is below

const _ref = React.useRef();

<CollapsibleHeaderScrollView ref={_ref} ... > 
</CollapsibleHeaderScrollView>

but when i use _ref.current.scrollTo, 'scrollTo' aways is undefined, is not a function.

  • Somebody help me D:

How to get scroll native event

Is there a way to get X and Y values on onScroll native event as we do when we use scrollView since CollapsibleHeaderScrollView is technically a scrollView as well.

support refreshControl?

Hi ๐Ÿ‘‹ !!, thanks for the library.. I have a question?, is there support for refresh Control?, because i am trying implement it but not work. I am using CollapsibleHeaderSectionList. Thanks very much

Support for refresh control

I would like to include a refresh control or use the onRefresh and refreshing props. However, I cannot get an indicator to appear.

scrollToTop undefined

Hi, I'm using CollapsibleHeaderScrollView and it works perfectly.
I need to reset scroll position to 0 if the user taps on the header but when i call scrollTo it's undefined.

In my code I set the ref:
<CollapsibleHeaderScrollView
ref={(ref) => {
this.ListView_Ref = ref;
}} ...

...and the function...

goToTop() {
this.ListView_Ref.scrollTo({x: 0, y: 0, animated: true});
}

...calling goToTop() gives undefined. What am I missing? Thanks

Header absolute and transparent

Is It possible to set the scrolling list position to absolute and headerContainerBackgroundColor="transparent" so the content sits under the header? As soon as apply absolute positioning to the list the header doesn't animate on scroll. I can work around this by setting a marginTop -HEADERHEIGHT style? thanks

Suggestion

Collapsible Header with Tab Navigators

can this be used with webview?

WebView has onScroll prop, so I guess in theory it should work. I have tried with

const AnimatedWebview = withCollapsibleHeader(WebView)

but I had no luck. Is this possible?

showHeader method

Hi i was wondering how can i use showHeader method outside of header component ?

The header does not receive touch events, when providing the minimum height

To specify the minimum height of the header, I gave the headerHeight less than the actual height. As I expected, the header was displayed at the minimum height in a collapsed state. But in this state, the buttons in the header did not work.
It seems that the touchable height follows the specified headerHeight, not the actual height of the header.

    <CollapsibleHeaderScrollView
      CollapsibleHeaderComponent={
        <>
          <View style={{height: 100}} />
          <Button style={{height: 100}} onPress={() => console.log('pressed')}>
            <Text>BUTTON</Text>
          </Button>
        </>
      }
      headerHeight={100}
    >
      <View style={{height: 5000, backgroundColor: 'wheat'}} />
    </CollapsibleHeaderScrollView>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.