Reverted passing of all props, only added autoComplete
This commit is contained in:
parent
4fcb74f8d8
commit
d7e7dfc55e
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "formsy-react",
|
||||
"version": "0.14.0",
|
||||
"version": "0.14.1",
|
||||
"description": "A form input builder and validator for React JS",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "formsy-react",
|
||||
"version": "0.14.0",
|
||||
"version": "0.14.1",
|
||||
"description": "A form input builder and validator for React JS",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -435,10 +435,11 @@ Formsy.Form = React.createClass({
|
|||
},
|
||||
render: function () {
|
||||
|
||||
return React.DOM.form(utils.extend({}, this.props, {
|
||||
return React.DOM.form({
|
||||
onSubmit: this.submit,
|
||||
className: this.props.className
|
||||
}),
|
||||
className: this.props.className,
|
||||
autoComplete: this.props.autoComplete
|
||||
},
|
||||
this.traverseChildrenAndRegisterInputs(this.props.children)
|
||||
);
|
||||
|
||||
|
|
|
|||
10
src/utils.js
10
src/utils.js
|
|
@ -37,15 +37,5 @@ module.exports = {
|
|||
}
|
||||
|
||||
return a === b;
|
||||
},
|
||||
extend: function () {
|
||||
var objects = [].slice.call(arguments);
|
||||
var initialObject = objects.shift();
|
||||
return objects.reduce(function (returnedObject, object) {
|
||||
return Object.keys(object).reduce(function (returnedObject, key) {
|
||||
returnedObject[key] = object[key];
|
||||
return returnedObject;
|
||||
}, returnedObject);
|
||||
}, initialObject);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue