提交 879eae82 authored 作者: chlolch's avatar chlolch

修改bug

上级 f96eab9d
......@@ -16,7 +16,7 @@ export default class ChildForm extends React.Component {
// Should provide an event to pass value to Form.
const onChange = this.props.onChange;
if (onChange) {
onChange(Object.assign({}, this.state, changedValue));
onChange(changedValue);
}
};
componentWillReceiveProps(nextProps) {
......@@ -24,8 +24,7 @@ export default class ChildForm extends React.Component {
if ('value' in nextProps) {
const value = nextProps.value;
this.setState(value)
this.state = value;
}
}
componentDidMount = () => {
......@@ -64,10 +63,12 @@ export default class ChildForm extends React.Component {
const x = form.getFieldValue(base52);
delete x[uuid];
delete x[""];
if (!('value' in this.props)) {
this.setState(x);
this.state=x
}
this.triggerChange(x);
......@@ -100,7 +101,6 @@ export default class ChildForm extends React.Component {
render() {
const objs = this.state;
const {
form,
mapData,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论