Skip to content

Commit

Permalink
Reverted passing of all props, only added autoComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni committed May 22, 2015
1 parent 4fcb74f commit d7e7dfc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion release/formsy-react.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/formsy-react.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);

Expand Down
10 changes: 0 additions & 10 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

0 comments on commit d7e7dfc

Please sign in to comment.