Commit f45b37e1 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'riri' into 'master'

apdet

See merge request !127
parents 90ca8295 814f6c50
......@@ -465,12 +465,11 @@ export default class ReportItems extends Component {
openPopUp(index, type) {
if (type === 'edit') {
this.setState({
selectIndex: index,
rowData: index,
edit: true
})
} else {
this.setState({
data: this.state.listData[index],
add: true
})
}
......@@ -564,6 +563,7 @@ export default class ReportItems extends Component {
const columns = [{
name: "Action",
options: {
sort: false,
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
......@@ -573,7 +573,7 @@ export default class ReportItems extends Component {
cursor: 'pointer',
borderColor: 'transparent'
}}
onClick={() => this.openPopUp(tableMeta.rowIndex, 'edit')}
onClick={() => this.openPopUp(tableMeta.rowData, 'edit')}
>
<img src={Images.editCopy} />
......@@ -875,7 +875,7 @@ export default class ReportItems extends Component {
{this.state.edit && (
<EditReportItems
onClickClose={() => this.setState({ edit: false })}
data={this.state.listData[this.state.selectIndex]}
data={this.state.rowData}
refresh={this.getData.bind(this)}
updateReportItems={this.updateReportItems.bind(this)}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment