Skip to content

Commit 1df3e35

Browse files
committed
Formsy.Form: omit Formsy-only props from the <form/> component
1 parent fec4576 commit 1df3e35

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/main.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,23 @@ Formsy.Form = React.createClass({
424424
this.validateForm();
425425
},
426426
render: function () {
427+
var {
428+
mapping,
429+
validationErrors,
430+
onSubmit,
431+
onValid,
432+
onInvalid,
433+
onInvalidSubmit,
434+
onChange,
435+
reset,
436+
preventExternalInvalidation,
437+
onSuccess,
438+
onError,
439+
...nonFormsyProps
440+
} = this.props;
427441

428442
return (
429-
<form {...this.props} onSubmit={this.submit}>
443+
<form {...nonFormsyProps} onSubmit={this.submit}>
430444
{this.props.children}
431445
</form>
432446
);

0 commit comments

Comments
 (0)