mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-01 21:30:30 +01:00
fix: don't check "select all" if there are no enabled checkboxes
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user