PedroBern / react-native-collapsible-tab-view

A cross-platform Collapsible Tab View component for React Native
MIT License
830 stars 161 forks source link

Is it possible to have pull to refresh on <Tabs.Container> ? #209

Closed jakobsuckow closed 2 years ago

jakobsuckow commented 2 years ago

Hello, Is it currently possible to implement a refreshControl on the top level container so that I can pull to refresh within my flatlist inside the and it will pull to refresh at the top ? Basically, just like instagram does it.

This is my code: ` <Tabs.Container renderHeader={Header} headerHeight={HEADER_HEIGHT} headerContainerStyle={{ borderColor: "#000", shadowOpacity: 0, }} containerStyle={{ shadowOpacity: 0, borderBottomColor: "#000" }} renderTabBar={props => <MaterialTabBar {...props} />}>

v + ""} bounces={false} /> ` Thanks so much :)
vbylen commented 2 years ago

I'm interested too.

andreialecu commented 2 years ago

Not sure if I understand the issue exactly but see #228 or https://github.com/PedroBern/react-native-collapsible-tab-view/blob/main/example/src/AndroidSharedPullToRefresh.tsx

Jamal-ReachFirst commented 1 year ago

Unable to reveal header after adding RefreshControl, on android allowHeaderOverscroll={true}

Reopen this issue until it is resolved.

azwinlam commented 1 year ago
        <Tabs.Tab name="Photos"> 
           <Tabs.ScrollView 
             onMomentumScrollEnd={() => {}} 
             showsVerticalScrollIndicator={false} 
             refreshControl={ 
               <RefreshControl refreshing={refreshing} onRefresh={onRefresh} /> 
             } 
           > 
             <PhotoTab 
               restInfo={restInfo} 
               language={language} 
               navigation={navigation} 
             /> 
           </Tabs.ScrollView> 
         </Tabs.Tab>
Jamal-ReachFirst commented 1 year ago

@azwinlam I want to add refresh on <Tabs.Container> not inside tabs

<ScrollView
     refreshControl={<RefreshControl ... />}
>
   <Tabs.Container>
     //.............
   </Tabs.Container>
</ScrollView

It only refreshes not revealing the header

Arise-cn commented 7 months ago

iOS

不确定我是否完全理解这个问题,但请参阅#228或https://github.com/PedroBern/react-native-collapsible-tab-view/blob/main/example/src/AndroidSharedPullToRefresh.tsx

refreshControl not show on ios