fix: don't check "select all" if there are no enabled checkboxes

v1.18.x
gasoved 4 years ago committed by Julian Lam
parent 850bf497ea
commit 3ba0575584

@ -23,7 +23,7 @@ define('admin/modules/checkboxRowSelector', function () {
}
const checkboxes = $checkboxEl.closest('tr').find('input:not([disabled])').toArray();
const $toggler = $(checkboxes.shift());
const rowState = checkboxes.every(el => el.checked);
const rowState = checkboxes.length && checkboxes.every(el => el.checked);
$toggler.prop('checked', rowState);
};

Loading…
Cancel
Save