ps-toolkit-ui 1.8.75 → 1.8.77
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/bundles/ps-toolkit-ui.umd.js +16 -10
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/form/select/form.select.component.js +17 -10
- package/fesm2015/ps-toolkit-ui.js +16 -9
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -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()) {
|
|
@@ -5333,7 +5332,7 @@
|
|
|
5333
5332
|
_this.inp.setValue(_this.inp.default, true);
|
|
5334
5333
|
}
|
|
5335
5334
|
else {
|
|
5336
|
-
_this.inp.
|
|
5335
|
+
_this.inp.setValue([], false);
|
|
5337
5336
|
}
|
|
5338
5337
|
if (_this.inp.rel != null) {
|
|
5339
5338
|
_this.inp.rel.options = [];
|
|
@@ -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
|
-
|
|
5508
|
+
if (this.inp.onlyChild) {
|
|
5509
|
+
this.unCheckParent(op.parent);
|
|
5510
|
+
}
|
|
5511
5511
|
}
|
|
5512
5512
|
else {
|
|
5513
5513
|
this.check(op);
|
|
5514
|
-
|
|
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.
|
|
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
|
-
|
|
5525
|
-
|
|
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);
|