ps-toolkit-ui 1.5.52 → 1.5.55

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.
@@ -1671,6 +1671,7 @@
1671
1671
  };
1672
1672
  FormClass.prototype.data = function (d) {
1673
1673
  if (d === void 0) { d = null; }
1674
+ console.log(this.inputs, 'this.inputs');
1674
1675
  if (this.inputs.findIndex(function (x) { return x.type === exports.InputType.File; }) === -1) {
1675
1676
  if (d == null) {
1676
1677
  d = {};
@@ -1678,7 +1679,20 @@
1678
1679
  this.inputs.forEach(function (inp) {
1679
1680
  var vl = inp.data();
1680
1681
  if (vl !== null) {
1681
- _.set(d, inp.name, vl);
1682
+ if (d[inp.name] === undefined) {
1683
+ _.set(d, inp.name, vl);
1684
+ console.log(d, inp.name, vl, 'undefined');
1685
+ }
1686
+ else {
1687
+ if (d[inp.name] instanceof Array) {
1688
+ d[inp.name].push(vl);
1689
+ console.log(d, inp.name, vl, 'instanceof Array');
1690
+ }
1691
+ else {
1692
+ d[inp.name] = [d[inp.name], vl];
1693
+ console.log(d, inp.name, vl, 'instanceof obj');
1694
+ }
1695
+ }
1682
1696
  }
1683
1697
  });
1684
1698
  }
@@ -7333,7 +7347,6 @@
7333
7347
  };
7334
7348
  FormStarComponent.prototype.onChange = function (s) {
7335
7349
  this.inp.value = s;
7336
- console.log(this.inp.value);
7337
7350
  if (this.inp.onChange) {
7338
7351
  this.inp.onChange(this.inp);
7339
7352
  }