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