ps-toolkit-ui 0.0.59 → 0.0.60
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 +10 -1
- 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/tree/form.tree.component.js +11 -2
- package/fesm2015/ps-toolkit-ui.js +10 -1
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/tree/form.tree.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5743,11 +5743,19 @@
|
|
|
5743
5743
|
FormTreeComponent.prototype.check = function (ids, chs) {
|
|
5744
5744
|
var e_2, _a;
|
|
5745
5745
|
if (chs === void 0) { chs = this.inp.rows; }
|
|
5746
|
+
var isChecked = false;
|
|
5747
|
+
var cIsChecked = false;
|
|
5746
5748
|
try {
|
|
5747
5749
|
for (var chs_1 = __values(chs), chs_1_1 = chs_1.next(); !chs_1_1.done; chs_1_1 = chs_1.next()) {
|
|
5748
5750
|
var r = chs_1_1.value;
|
|
5749
5751
|
r.selected = ids.includes(r.value);
|
|
5750
|
-
|
|
5752
|
+
if (r.selected) {
|
|
5753
|
+
isChecked = true;
|
|
5754
|
+
}
|
|
5755
|
+
cIsChecked = this.check(ids, r.children);
|
|
5756
|
+
if (this.inp.onlyChild && cIsChecked) {
|
|
5757
|
+
r.selected = true;
|
|
5758
|
+
}
|
|
5751
5759
|
}
|
|
5752
5760
|
}
|
|
5753
5761
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -5757,6 +5765,7 @@
|
|
|
5757
5765
|
}
|
|
5758
5766
|
finally { if (e_2) throw e_2.error; }
|
|
5759
5767
|
}
|
|
5768
|
+
return isChecked || cIsChecked;
|
|
5760
5769
|
};
|
|
5761
5770
|
FormTreeComponent.prototype.checkChildren = function (chs, ids) {
|
|
5762
5771
|
var e_3, _a;
|