|
|
@ -102,10 +102,10 @@ export default class TableForm extends PureComponent { |
|
|
}); |
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
const { data } = this.state; |
|
|
|
|
|
const { onChange } = this.props; |
|
|
|
|
|
delete target.isNew; |
|
|
delete target.isNew; |
|
|
this.toggleEditable(e, key); |
|
|
this.toggleEditable(e, key); |
|
|
|
|
|
const { data } = this.state; |
|
|
|
|
|
const { onChange } = this.props; |
|
|
onChange(data); |
|
|
onChange(data); |
|
|
this.setState({ |
|
|
this.setState({ |
|
|
loading: false, |
|
|
loading: false, |
|
|
@ -121,9 +121,9 @@ export default class TableForm extends PureComponent { |
|
|
const target = this.getRowByKey(key, newData); |
|
|
const target = this.getRowByKey(key, newData); |
|
|
if (this.cacheOriginData[key]) { |
|
|
if (this.cacheOriginData[key]) { |
|
|
Object.assign(target, this.cacheOriginData[key]); |
|
|
Object.assign(target, this.cacheOriginData[key]); |
|
|
target.editable = false; |
|
|
|
|
|
delete this.cacheOriginData[key]; |
|
|
delete this.cacheOriginData[key]; |
|
|
} |
|
|
} |
|
|
|
|
|
target.editable = false; |
|
|
this.setState({ data: newData }); |
|
|
this.setState({ data: newData }); |
|
|
this.clickedCancel = false; |
|
|
this.clickedCancel = false; |
|
|
} |
|
|
} |
|
|
|