@reactables/forms 1.0.0 → 1.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -886,7 +886,7 @@ var mergeBranchErrors = function (form, controlRef) {
|
|
|
886
886
|
return valid;
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
|
-
return __assign(__assign({}, acc), (_b = {}, _b[key] = __assign(__assign({}, control), { errors: errors, valid: selfValid && childrenValid, childrenValid: childrenValid }), _b));
|
|
889
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __assign(__assign({}, control), { errors: errors, valid: selfValid && childrenValid && !control.pending, childrenValid: childrenValid }), _b));
|
|
890
890
|
}, {});
|
|
891
891
|
var errorsMergedOrderRestored = reverseObjectKeys(errorsMerged);
|
|
892
892
|
return __assign(__assign({}, form), errorsMergedOrderRestored);
|
|
@@ -943,7 +943,7 @@ var mergeErrors = function (form) {
|
|
|
943
943
|
// If control is a FormGroup
|
|
944
944
|
childrenValid = Object.keys(control.value).every(function (childKey) { return acc[getFormKey(control.controlRef.concat(childKey))].valid; });
|
|
945
945
|
}
|
|
946
|
-
return __assign(__assign({}, acc), (_b = {}, _b[key] = __assign(__assign({}, control), { errors: errors, valid: selfValid && childrenValid, childrenValid: childrenValid }), _b));
|
|
946
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __assign(__assign({}, control), { errors: errors, valid: selfValid && childrenValid && !control.pending, childrenValid: childrenValid }), _b));
|
|
947
947
|
}, {});
|
|
948
948
|
var restoredOrder = reverseObjectKeys(errorsMerged);
|
|
949
949
|
return restoredOrder;
|
|
@@ -1032,7 +1032,7 @@ var mergeControls = function (state, _a) {
|
|
|
1032
1032
|
return valid;
|
|
1033
1033
|
});
|
|
1034
1034
|
}
|
|
1035
|
-
return __assign(__assign({}, acc), (_a = {}, _a[formKey] = __assign(__assign({}, newControl), { errors: errors, valid: selfValid && childrenValid, childrenValid: childrenValid }), _a));
|
|
1035
|
+
return __assign(__assign({}, acc), (_a = {}, _a[formKey] = __assign(__assign({}, newControl), { errors: errors, valid: selfValid && childrenValid && !newControl.pending, childrenValid: childrenValid }), _a));
|
|
1036
1036
|
}, {});
|
|
1037
1037
|
var orderRestored = reverseObjectKeys(updatedBranch);
|
|
1038
1038
|
var result = __assign(__assign({}, controlsRemoved), orderRestored);
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "David Lai",
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@reactables/core": "^1.0.0",
|
|
17
|
+
"@reactables/core": "^1.0.2-beta.0",
|
|
18
18
|
"lodash.isequal": "^4.5.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"lodash.clonedeep": "^4.5.0"
|
|
25
25
|
},
|
|
26
|
-
"version": "1.0.0"
|
|
26
|
+
"version": "1.0.2-beta.0"
|
|
27
27
|
}
|