5

I am trying to make my tab bars sticky I am using native base tabs bar and they are using "react-native-scrollable-tab-view". I Wraps my root View with scrollView and sets "stickyHeaderIndices={[1]}" and this works good for making my tab bar sticky on top but when these tab bars are stick on the top scroll is stop working before stick on to the top it is working fine but when these tabs get stick on to the top scroller stops it working any suggestion?

I tried to add another scrollView so my scroll gets work but no luck, I have FlatList component inside the tabs but FlatList's scroll also not working after stickyHeaderIndices before stickyHeaderIndices scroll works.

 <ScrollView
      stickyHeaderIndices={[1]}
      ref={ref => this.scrollView = ref}
      onContentSizeChange={(contentWidth, contentHeight) => {
        _scrollToBottomY = contentHeight
      }}
      contentContainerStyle={{flexGrow: 1, flex: 1}}>
 >  <AnotherComponent/>
    <MyTabsComponent />
</ScrollView>

The scroll should work after the stickyHeaderIndices.

Waheed Akhtar
  • 3,110
  • 1
  • 16
  • 30

0 Answers0