mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
allow user to return nothing in submitCallback
Useful when the callback is meant for side effect and not for modifying the data
This commit is contained in:
parent
5427e994b0
commit
755d5f6ad0
1 changed files with 4 additions and 4 deletions
|
@ -227,7 +227,7 @@ class SmartForm extends Component {
|
||||||
- Nested array item: 'addresses.1.city'
|
- Nested array item: 'addresses.1.city'
|
||||||
|
|
||||||
*/
|
*/
|
||||||
compactParent(data, path);
|
compactParent(data, path);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ class SmartForm extends Component {
|
||||||
|
|
||||||
// if there's a submit callback, run it
|
// if there's a submit callback, run it
|
||||||
if (this.props.submitCallback) {
|
if (this.props.submitCallback) {
|
||||||
data = this.props.submitCallback(data);
|
data = this.props.submitCallback(data) || data;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getFormType() === 'new') {
|
if (this.getFormType() === 'new') {
|
||||||
|
|
Loading…
Add table
Reference in a new issue