Scrollview inside a webview of react native project doesn't scroll
Hello,
I have react native app in which I have to display a webview. The webview is created in another RN project using react-native-web module and consists of a scrollview component. I am able to scroll the webview on my desktop, but unable to scroll it on my mobile screen on user's touch. Does the touch event go to the webview? How am I supposed to make it scroll?
I have written the webview code below.
var array1 = ['1','2','3','4','5','6','7','8','9','10'];
var array2 = ['11','12','13','14','15','16','17','18','19','20'];
import List1 from './List1';
...
...
render() {
return (
<View style={{flex:1}} >
<ScrollView
style={{backgroundColor:'#f2f2f2', paddingBottom:12, flex:1}}
contentContainerStyle={styles.container}
onScroll={(e)=>{this.onScroll(e)}}
onTouchMove={()=>{console.log('onTouchMove')}}
scrollEventThrottle={16}>
{
<View>
<Text style={styles.title}>
Array 1
</Text>
<View style={styles.container}>
{
this.state.array1.map((item,i) => {
return <List1 key={i} {...item}/>
})
}
</View>
<Text style={styles.title}>
Array 2
</Text>
<View style={styles.container}>
{
this.state.array2.map((item,i) => {
return <List1 key={i} {...item}/>
})
}
</View>
</View>
}
</ScrollView>
</View>
);
}
Regards, Shraddha
Thanks, this was caused by https://github.com/necolas/react-native-web/commit/6a9212df4004a40ec96000fa9bc17847db89cf51
Some stuff I've been reading...
Please try [email protected]
Thanks for the quick response. I'm unable to install the 0.0.40 version. The npm installation of this module version says that it is invalid.
I can't reproduce that.
Thanks! It worked like a charm