Merge pull request #2051 from lbke/feature/submitCallback

Allow user to return nothing in submitCallback
This commit is contained in:
Sacha Greif 2018-09-06 11:17:28 +09:00 committed by GitHub
commit 2dfc7d14ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -811,7 +811,7 @@ class SmartForm extends Component {
// if there's a submit callback, run it
if (this.props.submitCallback) {
data = this.props.submitCallback(data);
data = this.props.submitCallback(data) || data;
}
if (this.getFormType() === 'new') {