pipeOut 在设置初始值时要执行

This commit is contained in:
liaoxuezhi 2019-11-29 17:21:48 +08:00
parent 80077117b6
commit eed6f71f8f

View File

@ -464,6 +464,16 @@ export default class FormControl extends React.PureComponent<
return;
}
const {
formStore: form,
control: {pipeOut}
} = this.props;
if (pipeOut) {
const oldValue = this.model.value;
value = pipeOut(value, oldValue, form.data);
}
this.model.changeValue(value, true);
}