easy-react-form
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -58,19 +58,14 @@ 'use strict'; | ||
// when calling `set(field, value)` and `clear(field)`. | ||
// It also holds initial field values for form `reset()`. | ||
// | ||
// If a field happens to register the second time | ||
// (e.g. due to React "reconciliation" due to order change) | ||
// then no need to update its info. | ||
// This also prevents loosing the initial value of the field. | ||
// (e.g. as a result of React "reconciliation" because of the order change) | ||
// then the methods for the field will be updated. | ||
// | ||
if (!_this.fields[field]) { | ||
_this.fields[field] = { | ||
validate: validate, | ||
scroll: scroll, | ||
focus: focus | ||
}; | ||
} | ||
_this.fields[field] = { | ||
validate: validate, | ||
scroll: scroll, | ||
focus: focus | ||
// This is used for the `autofocus` feature. | ||
if (!_this.firstField) { | ||
// This is used for the `autofocus` feature. | ||
};if (!_this.firstField) { | ||
_this.firstField = field; | ||
@@ -83,2 +78,6 @@ } | ||
_this.setState(_this.state); | ||
// const { onStateChange } = this.props | ||
// if (onStateChange) { | ||
// onStateChange(this.state) | ||
// } | ||
}; | ||
@@ -85,0 +84,0 @@ |
@@ -58,19 +58,14 @@ 'use strict'; | ||
// when calling `set(field, value)` and `clear(field)`. | ||
// It also holds initial field values for form `reset()`. | ||
// | ||
// If a field happens to register the second time | ||
// (e.g. due to React "reconciliation" due to order change) | ||
// then no need to update its info. | ||
// This also prevents loosing the initial value of the field. | ||
// (e.g. as a result of React "reconciliation" because of the order change) | ||
// then the methods for the field will be updated. | ||
// | ||
if (!_this.fields[field]) { | ||
_this.fields[field] = { | ||
validate: validate, | ||
scroll: scroll, | ||
focus: focus | ||
}; | ||
} | ||
_this.fields[field] = { | ||
validate: validate, | ||
scroll: scroll, | ||
focus: focus | ||
// This is used for the `autofocus` feature. | ||
if (!_this.firstField) { | ||
// This is used for the `autofocus` feature. | ||
};if (!_this.firstField) { | ||
_this.firstField = field; | ||
@@ -83,2 +78,6 @@ } | ||
_this.setState(_this.state); | ||
// const { onStateChange } = this.props | ||
// if (onStateChange) { | ||
// onStateChange(this.state) | ||
// } | ||
}; | ||
@@ -85,0 +84,0 @@ |
{ | ||
"name": "easy-react-form", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "Simple, fast and easy-to-use React Form.", | ||
@@ -5,0 +5,0 @@ "main": "index.commonjs.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168501
1755