react-native icon indicating copy to clipboard operation
react-native copied to clipboard

<TouchableX> restricts PanResponder

Open amitverma opened this issue 10 years ago • 4 comments

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>
    );```

amitverma avatar Aug 23 '16 09:08 amitverma

@facebook-github-bot label Icebox

charpeni avatar Nov 14 '16 02:11 charpeni

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.

charpeni avatar Nov 14 '16 02:11 charpeni

@facebook-github-bot close

charpeni avatar Nov 14 '16 02:11 charpeni

@charpeni tells me to close this issue. If you think it should still be opened let us know why.

facebook-github-bot avatar Nov 14 '16 02:11 facebook-github-bot