<TouchableX> restricts PanResponder
I have fullscreen card views which are swiped up/down using PanResponder. I had to make use of <TouchableOpacity> to wrap a touchable element on each card and it has restricted the pan movement. I can understand why. But is there a workaround in place or planned?
return (
<Animated.View style={[styles.newsItemCtr, newsItemStyle, shadowStyle, this.x]}>
<TouchableOpacity onPress={this.handleItemPress}>
<View style={styles.imageCtr}>
<Image style={styles.imagePlaceholder} source={require('../images/topstories.png')} />
{this.props.imagesEnabled ? <Image style={styles.itemImage} source={{ uri: news.imageurl }} /> : null }
</View>
<View>
<View style={styles.itemBodyCtr}>
<Text style={styles.itemTitle} numberOfLines={Constants.NUM_LINES_NEWS_TITLE}>{news.title.replace(/<\/?[^>]+(>|$)/g, "")}</Text>
<Text style={styles.itemBody} numberOfLines={Constants.NUM_LINES_NEWS_BODY}>{news.snippet.replace(/<br>|<br\/>/g, '\n').replace(/<\/?[^>]+(>|$)/g, "")}</Text>
<View style={styles.ctaCtr}>
<TouchableOpacity style={styles.ctaItem} onPress={this.openFullStory.bind(this, news.url)}>
<View style={styles.ctaSubCtr}>
<Text style={styles.fullStoryTitle}>{this.props.getLabel('fullStory')}</Text>
<Text style={styles.fullStoryLink}>{news.source}</Text>
</View>
<Text style={styles.storyDate}>{this.getTimeagoLabel(news.published_ts)}</Text>
</TouchableOpacity>
</View>
</View>
</View>
</TouchableOpacity>
</Animated.View>
);```
@facebook-github-bot label Icebox
Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/touchablex-restricts-panresponder
ProductPains helps the community prioritize the most important issues thanks to its voting feature. It is easy to use - just login with GitHub.
Also, if this issue is a bug, please consider sending a PR with a fix. We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.
@facebook-github-bot close
@charpeni tells me to close this issue. If you think it should still be opened let us know why.