@reactables/forms 2.0.0-beta.4 → 2.0.0-beta.6

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 CHANGED
@@ -382,9 +382,11 @@ var controlRefCheck = function (ref) {
382
382
  catch (_a) { }
383
383
  };
384
384
 
385
- var checkKeys = function (obj1, obj2) {
386
- if (Object.keys(obj1).slice().sort().join() !== Object.keys(obj2).slice().sort().join()) {
387
- throw 'Can not update value because keys are not the same.';
385
+ var checkKeys = function (oldObj, newObj) {
386
+ var oldKeys = Object.keys(oldObj).slice().sort().join();
387
+ var newKeys = Object.keys(newObj).slice().sort().join();
388
+ if (oldKeys !== newKeys) {
389
+ console.warn("You are trying to update multiple controls but the keys don't match. It is recommended your keys match. Old keys: ".concat(oldKeys, ". New Keys: ").concat(newKeys, " "));
388
390
  }
389
391
  };
390
392
  var updateDescendantValues = function (form, _a, providers) {