netguru / sticky-parallax-header

A simple React Native library, enabling the creation of fully customized header for your iOS and Android apps.
https://netguru.github.io/sticky-parallax-header/
MIT License
1.86k stars 190 forks source link

is there a way to expand or collapse the header programmably? or default as closed? #210

Closed avivku90 closed 3 years ago

avivku90 commented 3 years ago

Title

pi0trpietruszewski commented 3 years ago

Use scrollRef.

const scrollToTop = ()=>  scrollView.current?.scrollTo?.(0);
  return <StickyParallaxHeader
        scrollRef={(ref) => {
          scrollView.current = ref;
        }}
/>