Repository navigation
DataTable: add selection checkboxes to collapsible groups - #8640
rickyzhangca wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: b9081ba The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
There was a problem hiding this comment.
🟡 Changes recommended
Two tests target a primer/css checkbox in unchanged stories that still render strapi, causing both clicks to time out and preventing the tests from completing.
2 open issues
What changed in this PR
Adds group-level selection to Primer React’s collapsible DataTable groups, allowing users to select current-page members even while a group is collapsed.
Changes:
- Adds group checkboxes with mixed and disabled states, plus controlled selection props for
Table.Group. - Aligns group and row controls and updates the existing collapsible-groups story.
- Adds selection coverage and updates accessibility guidance, API documentation, and release notes.
| File | Description |
|---|---|
packages/react/src/DataTable/useTable.ts |
Computes group selection state and toggles selectable members. |
packages/react/src/DataTable/TableGroup.tsx |
Adds controlled group checkboxes and header structure. |
packages/react/src/DataTable/Table.module.css |
Aligns controls and labels and adjusts disclosure spacing. |
packages/react/src/DataTable/DataTable.tsx |
Connects group checkboxes to selection actions. |
packages/react/src/DataTable/DataTable.features.stories.tsx |
Updates the collapsible-groups example. |
packages/react/src/DataTable/DataTable.docs.json |
Documents group selection props and behavior. |
packages/react/src/DataTable/DataTable.accessibility.md |
Describes checkbox scope, states, and keyboard order. |
packages/react/src/DataTable/__tests__/DataTableGroupSelection.test.tsx |
Covers selection scope, disabled groups, and controlled updates. |
packages/react/src/DataTable/__tests__/DataTableExpansion.test.tsx |
Updates alignment checks across directions and densities. |
e2e/components/DataTable.test.ts |
Updates group-selection interactions and checkbox locators. |
.changeset/tidy-groups-select.md |
Records the feature as a minor release. |
Review effort: Balanced
|
Integration test results from github/github-ui PR:
|

Adds selection checkboxes to collapsible groups when
rowSelectionis enabled. Each checkbox selects the group's selectable rows on the current page, including collapsed members, and reflects mixed or disabled states.Context: row selection handoff.
Same data and viewport; before uses the current main implementation.
Changelog
selection,selectionDisabled, andonToggleSelectprops toTable.Group.Rollout strategy
Testing & Reviewing
update snapshotsworkflow.