Renamed `this.updateModel` to `this.getModel`

This commit is contained in:
Semigradsky 2015-12-07 13:56:47 +03:00
parent c4fa202ebf
commit dcac495d79
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -107,7 +107,7 @@ Formsy.Form = React.createClass({
// If any inputs have not been touched yet this will make them dirty
// so validation becomes visible (if based on isPristine)
this.setFormPristine(false);
var model = this.updateModel();
var model = this.getModel();
model = this.mapModel(model);
this.props.onSubmit(model, this.resetModel, this.updateInputsWithError);
this.state.isValid ? this.props.onValidSubmit(model, this.resetModel, this.updateInputsWithError) : this.props.onInvalidSubmit(model, this.resetModel, this.updateInputsWithError);
@ -136,7 +136,7 @@ Formsy.Form = React.createClass({
// Goes through all registered components and
// updates the model values
updateModel: function () {
getModel: function () {
return this.inputs.reduce((model, component) => {
var name = component.props.name;
model[name] = component.state._value;