Datatable body onclick not working

UI Components for React
Post Reply
Posts: 1
Joined: 20 Mar 2018, 12:12

20 Mar 2018, 12:18

I have a table like this.

Code: Select all

    showDetail(event) {
 actionTemplate(rowData, column) {
        return <div>
            <Button type="button" icon="fa-play" className="ui-button-success"  onClick={this.runJob}></Button>
            <Button type="button" icon="fa-stop" className="ui-button-danger"></Button>
    executionDetail(rowData, column){
        return   <a onClick={() => this.showDetail}>Job executions</a>;
render() {
        return (
   <DataTable value={} >
                        <Column field="name" header="Navn"/>
                        <Column field="executionCount" header="Antall kjøringer"/>
                        <Column body={this.executionDetail}/>
                        <Column body={this.actionTemplate} style={{textAlign: 'center', width: '6em'}}/>
It seems that onclick event does not work neither on link or button.
Do i do anything wrong here?

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests