From f4a4ffc4ef2099248763b13fc16718a4cb5d6d57 Mon Sep 17 00:00:00 2001 From: Sven van de Scheur Date: Fri, 11 Oct 2024 15:16:41 +0200 Subject: [PATCH] :bug: - fix: fix a bug that could cause the select all checkbox to remain unchecked --- src/components/data/datagrid/datagridselectioncheckbox.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/data/datagrid/datagridselectioncheckbox.tsx b/src/components/data/datagrid/datagridselectioncheckbox.tsx index da09dfc..f594d21 100644 --- a/src/components/data/datagrid/datagridselectioncheckbox.tsx +++ b/src/components/data/datagrid/datagridselectioncheckbox.tsx @@ -44,9 +44,9 @@ export const DataGridSelectionCheckbox: React.FC< switch (selectAll) { case "page": - allSelected = - selectedRows?.every((a) => renderableRows.includes(a)) && - renderableRows.every((a) => selectedRows.includes(a)); + allSelected = renderableRows?.every((a, index) => + equalityChecker(a, selectedRows[index]), + ); checked = allSelected || false; disabled = Boolean(allPagesSelectedManaged && allPagesSelected); handleSelect = () => onSelectAll(!allSelected);