fixed the select all cb
This commit is contained in:
@@ -477,15 +477,17 @@ $style = @'
|
||||
// Column “Select All” toggling for On-Boarding
|
||||
// =======================================================================
|
||||
function toggleColumn(col) {
|
||||
const master = document.getElementById(
|
||||
`selectAll${col[0].toUpperCase() + col.slice(1)}Checkbox`
|
||||
);
|
||||
document
|
||||
.querySelectorAll(
|
||||
`#onboardTab input[type=checkbox][data-column=${col}]`
|
||||
)
|
||||
.forEach(cb => (cb.checked = master.checked));
|
||||
}
|
||||
const master = document.getElementById(`selectAll${col[0].toUpperCase() + col.slice(1)}Checkbox`);
|
||||
const children = document.querySelectorAll(`#onboardTab input[type=checkbox][data-column=${col}]`);
|
||||
|
||||
children.forEach(cb => {
|
||||
cb.checked = master.checked;
|
||||
|
||||
// Trigger native change event so the suboption logic runs
|
||||
cb.dispatchEvent(new Event('change'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// =======================================================================
|
||||
// Un-check “Select All” if any child is unchecked (& re-check if all are checked)
|
||||
|
||||
Reference in New Issue
Block a user