Skip to content

Commit

Permalink
Formsy.Form: omit Formsy-only props from the <form/> component
Browse files Browse the repository at this point in the history
  • Loading branch information
sdemjanenko committed Dec 10, 2015
1 parent fec4576 commit 1df3e35
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
Expand Down

0 comments on commit 1df3e35

Please sign in to comment.