Nativebase: Pull to refresh is not working with Tab layout

Created on 30 Jul 2018  路  5Comments  路  Source: GeekyAnts/NativeBase

Hi,

I am using refreshControl from react-native with native-base Tab layout, refreshControl often hangs while pulling to refresh, Please Suggest me some fix for this, Here is the code snippet,
Here is my Tab code where I am applying the pull to refresh functionality

<Tabs tabBarUnderlineStyle={{borderBottomWidth:1}} > <Tab heading={ <TabHeading > <Icon style={styles.TabIcon} name="random" type="FontAwesome" /> <Text style={styles.TabText}>Random</Text> </TabHeading>}> <Content refreshControl={ <RefreshControl refreshing={this.state.refreshing} onRefresh={this._onRefresh} title="Loading..." /> } onScroll={({ nativeEvent }) => { if (isCloseToBottom(nativeEvent)) { this.appendQuotes(); } }} scrollEventThrottle={400} > {quoteList} {spinner} </Content> </Tab>

Most helpful comment

I made a little change in your provided code, to demonstrate basic example of Tabs with pull to refresh. worked fine
tabs

All 5 comments

Cant find Tab code

Updated the code, Please check now, It was direct inside the Tab so didn't mention earlier

I made a little change in your provided code, to demonstrate basic example of Tabs with pull to refresh. worked fine
tabs

That looks fine and same as what I am working with. But When I am placing tab having refresh Control as the first tab then I encountered this problem. So using your code will changing the Tab position will work?

tabs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

georgemickael-b picture georgemickael-b  路  3Comments

maphongba008 picture maphongba008  路  3Comments

natashache picture natashache  路  3Comments

omerdn1 picture omerdn1  路  3Comments

sihemhssine picture sihemhssine  路  3Comments