-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Listview doesn't scroll when inside a scrollview #1966
Comments
just see noder, I put five listView into a scrollView, it works well. |
Are you running version 0.7? I see you have |
Is it necessary to wrap your ListView with ScrollView? |
I have three separate list views that show all the items, as i don't want them scrolling. So I wrap all three in a single scroll view. My above example is a simple & short one to show the issue. |
I have update my project noder to 0.7.1, it works well, |
@soliury i wonder if it's because your PageScrollView component is horizontal as opposed to vertical. |
Doing some more experimentation with this. I seem to have scroll issues when it's a really long body of content. Do i need to manually set the height or add styling of some kind? I just have an app with a scroll view tag and 100+ components in it. I can't scroll down the page either. |
Realized a change along the way must have broke how i was using the scrollview. Updating to 0.8.0-rc, using the Dimensions package has helped me fix this. I set the height of my top level view in index.ios.js to that of the screen:
Then pass a flex 1 to the scrollview in my subcomponents. Though with this method, you'll need a scrollview in every component that requires scrolling. |
how to make scrollable ListView inside Modal ??? Modal |
@DurgaManickam I got the same issue, sloved by setting height of ListView. |
@phoue should I get the height from Dimensions, to make the modal get the whole screen? |
I had the same issue as I had the following component structure.
As wrapping the ListView inside the ScrollView the parent scroll action dominates the child scroll action which leads only ScrollView to scroll.
Add And Finally add following to the View which wraps the ListView( immediate parent )
this works very well on IOS and Android both, scrolls the ListView if the touch is on List and else it scrolls the ScrollView |
@sadafk831 awesome solution. Saved my time and effort at crucial time. |
@sadafk831 thanks for your feedback. It helps. |
@sadafk831 what is scrollProperties.offset? it throws me an undefined is not an object error. |
@sadafk831 : Could you post a complete code example? I get lost somewhere. |
@Thanmai-C I am using FlatList, not sure if this is the right way but I wrote this.refs.myList._listRef._scrollMetrics.offset instead. |
@sadafk831 what is "this.refs.myList"? I am new to react-native |
@sadafk831 I am using FlatList instead of listview. I am getting offset of undefined error message. Please give me someone solution |
Noticed this after upgrading to 0.7.1 from 0.6.
Below is a simple example to reproduce. I noticed it when upgrading my app that has three separate list views inside a scrolling container. List views are set to show all rows, as they're not expected to be very long. But all three are large enough to go off page.
The text was updated successfully, but these errors were encountered: