From e3172b2dc57ad335fdb3204679abdfeac0ca0808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 5 Jul 2024 15:15:28 +0200 Subject: [PATCH] Check every rows are selected to keep global selection checked Closes #13393 --- sao/src/view/tree.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sao/src/view/tree.js b/sao/src/view/tree.js index 62834f8ee3..05ee29cafa 100644 --- a/sao/src/view/tree.js +++ b/sao/src/view/tree.js @@ -1239,9 +1239,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);