1724 次
1 回答
3
react-native 官方网站上有一个很好的教程:https ://facebook.github.io/react-native/docs/listview.html
在renderRow回调中,您收到 4 个参数(rowData, sectionID, rowID, highlightRow)- 所以只需传递rowID给您的TouchableHighlight处理程序:
renderRow(rowData, sectionID, rowID) {
<TouchableHighlight
onPress={this.goToStats.bind(this, rowID)}
...
于 2016-05-30T20:17:11.487 回答