class ManageTable extends Component{
showModal(){
}
render(){
return(
<tr id={user.id}>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td ref="viewDatail"><a onClick={this.showModal}>查看详情</a></td>
</tr>
)
}
}
export default ManageTable;
Click to view details, how to get the ID of the current row.
I want to complete the next step. The first step is to obtain the ID. How to achieve this?
Seek the guidance of the great God.
Try it:
<td ref="viewDatail"><a onClick={this.showModal.bind(this)}>查看详情</a></td>