2017-04-04 5 views
0

listview의 값을 가져 와서 전송하는 데 문제가 있습니다.전송할 목록보기에서 값 가져 오기 React-Native

등급 시스템 (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> 
관련 문제