Is it possible to disable scrolling of ListView? I've tried noScroll
:
<ListView noScroll={true}> </ListView>
But it doesn't seem to make any difference.
To enable or disable scrolling on FlatList with React Native, we can set the scrollEnabled prop. to set the scrollEnabled prop to false to disable scrolling on the FlatList.
Conclusion. To hide the scrollbar in a FlatList with React Native in Android, we can set the showsVerticalScrollIndicator and showsHorizontalScrollIndicator props to false .
To scroll to top of the ScrollView with React Native, we assign a ref to the ScrollView and call scrollTo on the ref's value. to create a ref with useRef and set that as the value of the ref prop of the ScrollView . Then we add a Button that calls ref. current.
ScrollView contentContainerStyle defines the inner container of it, e.g items alignments, padding, etc. Follow this answer to receive notifications.
i think it should be
scrollEnabled={false}
http://facebook.github.io/react-native/docs/scrollview.html#props
Sometimes scrolling is disabled only by applying both scrollEnabled
and nestedScrollEnabled
:
<ScrollView scrollEnabled={false} nestedScrollEnabled={false} > {children} </ScrollView>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With