Nativebase: ScrollView within Content

Created on 13 Oct 2016  路  7Comments  路  Source: GeekyAnts/NativeBase

ScrollView doesn't work within Content because Content is a ScrollView itself. Scrolling functionality takes precedence to Content rather than the ScrollView within Content.

Proposed solution:

  • Make Content a View, rather than a ScrollView.

Similar issue at #177

Most helpful comment

I think we need a ContentNoScroll component.

All 7 comments

Use scrollEnabled={false} with <Content>

@sankhadeeproy007 this is not a solution. This will disable scroll for all sub views as well. What we want is the scroll to be set for the ScrollView within Content. Which isn't possible when Content is a ScrollView.

@smithb1994 I replaced Tabs element with https://github.com/aksonov/react-native-tab, put it in the header and fell totally happy.

I think we need a ContentNoScroll component.

@alvelig the correct link is https://github.com/aksonov/react-native-tabs

This worked for me
<Content contentContainerStyle={{flex:1}}> (or) <Content scrollEnabled={false}>

@Nvelu048 @sankhadeeproy007 What is the point of using a content element if we are disabling scrolling? Isn't this the whole point of the element in the first place?

Edit: Actual solution found. Take a look at: https://stackoverflow.com/questions/29756217/react-native-nested-scrollview-locking-up

Add the following prop to any nested scrollviews
<ScrollView nestedScrollEnabled={true}></ScrollView>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

georgemickael-b picture georgemickael-b  路  3Comments

muthuraman007 picture muthuraman007  路  3Comments

omerdn1 picture omerdn1  路  3Comments

aloifolia picture aloifolia  路  3Comments

chetnadaffodil picture chetnadaffodil  路  3Comments