From f11d90ada0fe53ac60567c14bd95aabc509b855d 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 (grafted from 451236ad0b5ed240675e3db6e7c9f0dc133cdfd9) --HG-- branch : 6.0 --- 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 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);