mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-28 09:31:17 +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 checkboxes = $checkboxEl.closest('tr').find('input:not([disabled])').toArray();
|
||||||
const $toggler = $(checkboxes.shift());
|
const $toggler = $(checkboxes.shift());
|
||||||
const rowState = checkboxes.every(el => el.checked);
|
const rowState = checkboxes.length && checkboxes.every(el => el.checked);
|
||||||
$toggler.prop('checked', rowState);
|
$toggler.prop('checked', rowState);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user