Formsy.Form: omit Formsy-only props from the `<form/>` component
This commit is contained in:
parent
fec4576d1b
commit
1df3e3520f
16
src/main.js
16
src/main.js
|
|
@ -424,9 +424,23 @@ Formsy.Form = React.createClass({
|
|||
this.validateForm();
|
||||
},
|
||||
render: function () {
|
||||
var {
|
||||
mapping,
|
||||
validationErrors,
|
||||
onSubmit,
|
||||
onValid,
|
||||
onInvalid,
|
||||
onInvalidSubmit,
|
||||
onChange,
|
||||
reset,
|
||||
preventExternalInvalidation,
|
||||
onSuccess,
|
||||
onError,
|
||||
...nonFormsyProps
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<form {...this.props} onSubmit={this.submit}>
|
||||
<form {...nonFormsyProps} onSubmit={this.submit}>
|
||||
{this.props.children}
|
||||
</form>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue