Skip to content

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Sep 4, 2025

Problem

When users select all rows matching their filters using the <SelectAllButton>, and then unselect rows using the <Datagrid> or <DataTable> header checkbox, all selected records are deselected instead of just the current page records.

Solution

Make sure only the currently displayed records are affected by the header checkbox.

How To Test

<Datagrid>

Story

  1. Set the Rows per page option to 5
  2. Select all records in the current page (either individually or using the header checkbox): You should have 5 selected records
  3. Click the Select all bulk actions button: You should have 7 selected records
  4. Click the header checkbox): You should have 2 selected records
  5. Click the cross button in the bulk actions banner: You should have 0 selected records

<DataTable>

Story

  1. Set the Rows per page option to 5
  2. Select all records in the current page (either individually or using the header checkbox): You should have 5 selected records
  3. Click the Select all bulk actions button: You should have 7 selected records
  4. Click the header checkbox): You should have 2 selected records
  5. Click the cross button in the bulk actions banner: You should have 0 selected records

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@djhi djhi added the RFR Ready For Review label Sep 4, 2025
@Madeorsk Madeorsk merged commit 168c171 into master Sep 4, 2025
24 of 25 checks passed
@Madeorsk Madeorsk deleted the fix-datagrid-datatable-bulk-selection branch September 4, 2025 16:51
@Madeorsk Madeorsk added this to the 5.11.1 milestone Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Development

Successfully merging this pull request may close these issues.

2 participants