masked-view
masked-view copied to clipboard
ScrollView is not working inside maskElement
`<MaskedView
style={styles.container}
maskElement={
<View
style={[
{
flex: 1,
display: 'flex',
backgroundColor: 'white',
},
]}>
<ScrollView
contentContainerStyle={{padding: 10}}
style={{
flex: 1,
width: '100%',
borderColor: 'red',
borderWidth: 1,
}}>
{this.state.data.map(item => {
return (
<Animated.View
key={item.id}
style={[
styles.box,
{
// transform: [
// {
// scale: this.state.animations
// ? this.state.animations[item.id].scale
// : 0,
// },
// ],
opacity: this.state.animations
? this.state.animations[item.id].scale
: 0,
},
]}
/>
);
})}
</ScrollView>
<Animated.View
style={[
styles.floatButton,
{
transform: [
{
scale: this.state.scale,
},
],
opacity: this.state.opacityFade,
// backgroundColor: this.state.done ? 'transparent' : 'blue',
},
]}
/>
</View>
}>
<Animated.View
style={{
flex: 1,
opacity: this.state.opacityView,
}}>
<Details visible={!this.state.started} onPress={this.animateButton} />
</Animated.View>
</MaskedView>`
Were you able to resolve this?
On Thu, 3 Oct 2019 at 2:12 AM, Adit Deshpande [email protected] wrote:
Were you able to resolve this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/react-native-community/react-native-masked-view/issues/20?email_source=notifications&email_token=AE4K6ZUONW2YIYDONOC2AO3QMUBTVA5CNFSM4IM7ESP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAGDQYI#issuecomment-537671777, or mute the thread https://github.com/notifications/unsubscribe-auth/AE4K6ZVDJ25C5CF55P5BZQLQMUBTVANCNFSM4IM7ESPQ .
No, not yet.
Xavior
Found a bit of a solution. If you look at the underlying code, you can see that pointerEvents is being set to none which is why touches aren't being propagated. You patch that file to set it to none.
If you do that, and set the zIndex of the mask lower than that of the scrollView, then it should work. Hope it helps.
Any fix for this?