Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] ListView/FlatList not able to scroll inside Content component #1222

Closed
thienlhh opened this issue Sep 11, 2017 · 10 comments
Closed

Comments

@thienlhh
Copy link

thienlhh commented Sep 11, 2017

I have a FlatList inside a Content component with some other components that make the Content over height and scrollable. The problem I have that the FlatList was not able to scroll when Content scrollable.

react-native, react and native-base version

react: 16.0.0-alpha.12
react-native: 0.45.1
native-base: 2.2.0

Expected behaviour

The List should scrollable

Steps to reproduce (code snippet or screenshot)

My list:
<FlatList style={{ width: '100%', borderWidth: 1, borderColor: '#e0e1e2', marginTop: 10, height: 270, flex: 1 }} data={positions} renderItem={this.renderPosition} keyExtractor={(item, index) => item.id} />

Is the bug present in both ios and android or in any one of them?

Android only

@sachithamh
Copy link

same issu

@shivrajkumar
Copy link
Collaborator

@thienlhh Remove the height from the FlatList. If you really need the list to be taking up only that much of space. Wrap it with a View maybe and apply the height there

@thienlhh
Copy link
Author

Thanks @shivrajkumar for tip, may be I'll try later as my project running to deadline. I have to use an other workaround by using NestedScrollView

@jkeller22
Copy link

I am encountering this same issue, and I do not have a fixed height set for the FlatList, but on a View as suggested by @shivrajkumar.

@shivrajkumar
Copy link
Collaborator

shivrajkumar commented Sep 28, 2017

@jkeller22 Were you able to resolve this as per suggestion?

@bispul
Copy link

bispul commented Nov 6, 2017

did anyone find any solution?

@akhil-ga
Copy link
Contributor

akhil-ga commented Nov 9, 2017

@thienlhh In this case, if possible use a <View/> instead of <Content/>.

As wrapping the ListView inside the ScrollView the parent scroll action dominates the child scroll action which leads only ScrollView to scroll.

See React Native issue comment here

@akhil-ga
Copy link
Contributor

Closing the issue due to no response

@olekspickle
Copy link

olekspickle commented May 31, 2018

Did any of suggested earlier and nothing seems to be helping. Any update? My FlatList not even nested, still it is showing no signs of life or scrollability in particular...

<View> <FlatList data={numbers} renderItem={this._renderNumbers} keyExtractor={this._keyExtractor} /> </View>

@akhil-ga
Copy link
Contributor

akhil-ga commented Jun 1, 2018

@alexgnatrow can you try this facebook/react-native#1966 (comment)

@GeekyAnts GeekyAnts locked as off-topic and limited conversation to collaborators Jun 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants