ps-toolkit-ui 1.8.75 → 1.8.76

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.
@@ -5291,7 +5291,6 @@
5291
5291
  _this.selectOption(v == null ? null : v.toString(), isEdit);
5292
5292
  }
5293
5293
  else {
5294
- console.log(v, '#######');
5295
5294
  if (v != null) {
5296
5295
  try {
5297
5296
  for (var v_1 = __values(v), v_1_1 = v_1.next(); !v_1_1.done; v_1_1 = v_1.next()) {
@@ -5504,26 +5503,33 @@
5504
5503
  }
5505
5504
  };
5506
5505
  FormSelectComponent.prototype.toggle = function (op) {
5507
- var _this = this;
5508
5506
  if (op.selected) {
5509
5507
  this.unCheck(op);
5510
- setTimeout(function () { _this.unCheckParent(op.parent); }, 100);
5508
+ if (this.inp.onlyChild) {
5509
+ this.unCheckParent(op.parent);
5510
+ }
5511
5511
  }
5512
5512
  else {
5513
5513
  this.check(op);
5514
- setTimeout(function () { _this.checkParent(op.parent); }, 100);
5514
+ if (this.inp.onlyChild && this.inp.type === exports.InputType.Tree) {
5515
+ this.checkParent(op.parent);
5516
+ }
5515
5517
  }
5516
5518
  };
5517
5519
  FormSelectComponent.prototype.check = function (c) {
5518
5520
  c.selected = true;
5519
- this.checkChildren(c);
5521
+ if (this.inp.onlyChild) {
5522
+ this.checkChildren(c);
5523
+ }
5520
5524
  };
5521
5525
  FormSelectComponent.prototype.unCheck = function (c) {
5522
5526
  var _this = this;
5523
5527
  c.selected = false;
5524
- c.options.forEach(function (ch) {
5525
- _this.unCheck(ch);
5526
- });
5528
+ if (this.inp.onlyChild) {
5529
+ c.options.forEach(function (ch) {
5530
+ _this.unCheck(ch);
5531
+ });
5532
+ }
5527
5533
  };
5528
5534
  FormSelectComponent.prototype.checkChildren = function (o) {
5529
5535
  var _this = this;
@@ -5625,7 +5631,7 @@
5625
5631
  try {
5626
5632
  for (var opts_1 = __values(opts), opts_1_1 = opts_1.next(); !opts_1_1.done; opts_1_1 = opts_1.next()) {
5627
5633
  var f = opts_1_1.value;
5628
- if (f.selected) {
5634
+ if (f.selected && (!this.inp.onlyChild || f.options.length === 0)) {
5629
5635
  l.push(f.value);
5630
5636
  }
5631
5637
  var rs = this.getSelected(f.options);