Commit 39e01eb4 authored by Riri Novita's avatar Riri Novita

Merge branch 'dev-riri' into 'ENV-DEV'

issue calculate lov

See merge request !2236
parents b6d0ecdf 417a524b
......@@ -1107,10 +1107,23 @@ export default class LOCF extends Component {
})
dataTable2 = newData.sort((a, b) => a[47] - b[47])
let lastArray = dataTable2[dataTable2.length - 1]
if (this.state.visibleLOCFMR == false) {
if (this.props.dataTablelocf) {
if (this.props.dataTablelocf.length !== dataTable2.length) {
this.setState({ updateData: true })
}
}
} else {
if (this.props.dataTablelocf) {
if (this.props.dataTablelocf.length !== dataTable2.length) {
this.setState({ updateData: true })
}
}
}
this.setState({ dataTable: dataTable2 }, () => {
setTimeout(() => {
this.setState({ loading: false })
this.props.sendToParent(dataTable2, lastArray, 'LOCF', 'tambah')
this.props.sendToParent(dataTable2, lastArray, 'LOCF', 'tambah', this.state.visibleLOCFMR, this.state.updateData)
}, 500)
})
}
......
......@@ -975,10 +975,23 @@ export default class LOV extends Component {
})
dataTable2 = newData.sort((a, b) => a[16] - b[16])
let lastArray = dataTable2[dataTable2.length - 1]
if (this.state.visibleLOVMR == false) {
if (this.props.dataTablelov) {
if (this.props.dataTablelov.length !== dataTable2.length) {
this.setState({ updateData: true })
}
}
} else {
if (this.props.dataTablelov) {
if (this.props.dataTablelov.length !== dataTable2.length) {
this.setState({ updateData: true })
}
}
}
this.setState({ dataTable: dataTable2 }, () => {
setTimeout(() => {
this.setState({ loading: false })
this.props.sendToParent(dataTable2, lastArray, 'LOV', 'tambah', this.state.visibleLOVMR)
this.props.sendToParent(dataTable2, lastArray, 'LOV', 'tambah', this.state.visibleLOVMR, this.state.updateData)
}, 500)
})
}
......
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