我在获取listview的值然后发送它们时遇到问题。
这是一个评级系统(RatingBar),我想获得每个项目的名称和评级。
由于
答案 0 :(得分:0)
<ListView>
renderRow={(rowData, sec, i) =>
(
// you can use button or any other click event here
<TouchableHighlight
activeOpacity={75 / 100}
underlayColor={'rgb(210,210,210)'}
onPress={() => {
// You can get value like:
rowData.name
// Set them in a state to use anywhere or pass to function from here itself. set state example
this.setState({
name: rowData.name,
})
}}
>
</TouchableHighlight>
)
</ListView>