Skip to content

Commit 71ef93a

Browse files
committed
Fix bug on #5654
Parent checkbox updating was failing
1 parent 24f9fec commit 71ef93a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

decidim-core/app/assets/javascripts/decidim/check_boxes_tree.js.es6

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class CheckBoxesTree {
101101
* @returns {Void} - Returns nothing.
102102
*/
103103
checkTheCheckParent(input) {
104-
const checkBoxContext = input.parentNode.parentNode.parentNode.getAttribute("id");
104+
const checkBoxContext = input.parentNode.parentNode.getAttribute("id");
105105
if (!checkBoxContext) {
106106
this.checkGlobalCheck();
107107
return;
@@ -111,13 +111,13 @@ class CheckBoxesTree {
111111
`[data-checkboxes-tree=${checkBoxContext}]`
112112
);
113113
const totalCheckSiblings = document.querySelectorAll(
114-
`#${checkBoxContext} > div > [data-children-checkbox] > input`
114+
`#${checkBoxContext} > [data-children-checkbox] > input`
115115
);
116116
const checkedSiblings = document.querySelectorAll(
117-
`#${checkBoxContext} > div > [data-children-checkbox] > input:checked`
117+
`#${checkBoxContext} > [data-children-checkbox] > input:checked`
118118
);
119119
const indeterminateSiblings = document.querySelectorAll(
120-
`#${checkBoxContext} > div > [data-children-checkbox] > input:indeterminate`
120+
`#${checkBoxContext} > [data-children-checkbox] > input:indeterminate`
121121
);
122122

123123
if (checkedSiblings.length === 0) {

0 commit comments

Comments
 (0)