diginet-core-ui 1.4.67-beta.1 → 1.4.67-beta.2
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.
|
@@ -97,21 +97,19 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
97
97
|
const checkedParentFollowValue = nodes => {
|
|
98
98
|
if (nodes && nodes !== null && nodes !== void 0 && nodes.length) {
|
|
99
99
|
nodes.forEach(node => {
|
|
100
|
+
const checkedLeastOfOne = Array.from(node.querySelectorAll('input')).slice(1).some(el => el.checked);
|
|
101
|
+
const checkedAll = Array.from(node.querySelectorAll('input')).slice(1).every(el => el.checked);
|
|
100
102
|
if (!node.classList.contains('non-child')) {
|
|
101
103
|
const input = node.firstChild.querySelector('input');
|
|
102
104
|
if (input.checked) {
|
|
103
|
-
if (
|
|
105
|
+
if (checkedAll) {
|
|
104
106
|
determinateCheckbox(input, true);
|
|
107
|
+
} else if (checkedLeastOfOne) {
|
|
108
|
+
determinateCheckbox(input, false);
|
|
105
109
|
}
|
|
106
|
-
Array.from(node.querySelectorAll('
|
|
107
|
-
el.checked = true;
|
|
108
|
-
if (!el.classList.contains('determinate')) {
|
|
109
|
-
determinateCheckbox(el, true);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
110
|
+
checkedParentFollowValue(Array.from(node.querySelectorAll('div.TreeView-Item non-child, div.DGN-UI-Accordion')));
|
|
112
111
|
} else {
|
|
113
112
|
var _node$lastChild, _node$lastChild$first;
|
|
114
|
-
const checkedLeastOfOne = Array.from(node.querySelectorAll('input')).some(el => el.checked);
|
|
115
113
|
if (checkedLeastOfOne) {
|
|
116
114
|
input.checked = checkedLeastOfOne;
|
|
117
115
|
if (input.classList.contains('determinate')) {
|