@domonda/form
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -6,2 +6,14 @@ # Change Log | ||
## [1.2.1](https://github.com/domonda/domonda-js/compare/@domonda/form@1.2.0...@domonda/form@1.2.1) (2019-07-26) | ||
### Bug Fixes | ||
* **FormState:** correctly handle changed state ([ce4514b](https://github.com/domonda/domonda-js/commit/ce4514b)) | ||
* **FormState:** correctly handle default value changes for non-existant field paths ([8f3d233](https://github.com/domonda/domonda-js/commit/8f3d233)) | ||
# [1.2.0](https://github.com/domonda/domonda-js/compare/@domonda/form@1.1.1...@domonda/form@1.2.0) (2019-07-19) | ||
@@ -8,0 +20,0 @@ |
@@ -25,3 +25,7 @@ "use strict"; | ||
function setChangedOnAllFormFields(fields, changed) { | ||
return Object.keys(fields).reduce((acc, curr) => (Object.assign({}, acc, { [curr]: Object.assign({}, fields[curr], { changed }) })), {}); | ||
return Object.keys(fields).reduce((acc, curr) => { | ||
return Object.assign({}, acc, { | ||
// if the value under a path does not exist, the field definitely changed! | ||
[curr]: Object.assign({}, fields[curr], { changed }) }); | ||
}, {}); | ||
} | ||
@@ -28,0 +32,0 @@ exports.setChangedOnAllFormFields = setChangedOnAllFormFields; |
{ | ||
"name": "@domonda/form", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Powerful yet simple form library built on top of RxJS.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
26048
514