I have a table like this.
Code: Select all
showDetail(event) {
console.log('dd')
}
runJob(){
console.log("sadsadfas")
}
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>
</div>;
}
executionDetail(rowData, column){
return <a onClick={() => this.showDetail}>Job executions</a>;
}
render() {
return (
<DataTable value={this.state.jobs} >
<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'}}/>
</DataTable>
)
Do i do anything wrong here?