diff --git a/sao/src/view/tree.js b/sao/src/view/tree.js index 756a10edba..2968065d24 100644 --- a/sao/src/view/tree.js +++ b/sao/src/view/tree.js @@ -1040,9 +1040,9 @@ this.selection.prop('indeterminate', false); if (jQuery.isEmptyObject(selected_records)) { this.selection.prop('checked', false); - } else if (selected_records.length == - this.tbody.children().length && - this.display_size >= this.group.length) { + } else if ( + this.rows.every((row) => row.is_selected()) && + (selected_records.length >= this.tbody.children().length)) { this.selection.prop('checked', true); } else { this.selection.prop('indeterminate', true);