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

Getting issue with TouchableOpacity

Open HarshaVardhanPVK opened this issue 8 years ago • 0 comments

I am trying to use "TouchableOpacity" in my Grid View and wrote my code like bellow

showPlayer(item) {
        Alert.alert("Sample", "showPlayer");
}

renderItem(item) {
      	return <TouchableOpacity style={{alignItems:"center"}} onPress={this.showPlayer.bind(this, item)}>
      		<ImageLoad
      			placeholderSource = {require('../images/PlaceHolder.png')}
			    style={styles.thumbnail}
			    isShowActivity = {false}
			    source={{uri: thumbnailObj.value}}
		/>
   		<Text style={styles.gridText}> {item.name}</Text>
   	</TouchableOpacity>
  }

For the above code I am getting error as "undefined is not an object (evaluating 'this.showPlayer.bind')"

HarshaVardhanPVK avatar Aug 28 '17 12:08 HarshaVardhanPVK