fix: wire Select all checkbox on Time Off multi-select tables#1691
Merged
jeffredodd merged 2 commits intomainfrom May 6, 2026
Merged
fix: wire Select all checkbox on Time Off multi-select tables#1691jeffredodd merged 2 commits intomainfrom
jeffredodd merged 2 commits intomainfrom
Conversation
71a018f to
e659cdb
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the Time Off multi-select tables so their header “Select all” checkbox actually propagates through the component chain to the existing DataView/DataTable selection API.
Changes:
- Added
onSelectAllprop plumbing through Time Off employee-table wrappers and policy-detail layout types. - Implemented visible-row bulk selection handlers for policy detail, add-employees, and holiday selection flows.
- Added one regression test covering the policy-detail presentation header checkbox behavior.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/components/UNSTABLE_TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.ts |
Extends policy-detail employee props to include onSelectAll. |
src/components/UNSTABLE_TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.test.tsx |
Adds a presentation test for header-checkbox select-all behavior. |
src/components/UNSTABLE_TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.tsx |
Implements bulk-selection state updates for visible employees. |
src/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.ts |
Adds shared handleSelectAll selection logic for employee flows. |
src/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTypes.ts |
Adds onSelectAll to standalone SelectEmployees props. |
src/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.tsx |
Wires select-all through the time-off add-employees flow and capture ref. |
src/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.ts |
Adds onSelectAll to presentation props. |
src/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.tsx |
Forwards onSelectAll into EmployeeTable. |
src/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.tsx |
Wires select-all through the holiday add-employees flow. |
src/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployees.tsx |
Forwards onSelectAll in the standalone component. |
src/components/UNSTABLE_TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.ts |
Adds onSelectAll to layout employee prop typing. |
src/components/UNSTABLE_TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.tsx |
Forwards onSelectAll from layout to EmployeeTable. |
src/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTableTypes.ts |
Adds onSelectAll to shared employee-table props. |
src/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.tsx |
Passes onSelectAll into useDataView. |
src/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.ts |
Adds select-all typing for holiday selection mode. |
src/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.tsx |
Forwards onSelectAll into holiday useDataView selection props. |
src/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.tsx |
Implements holiday bulk-selection state updates and wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| selectedUuids: Set<string> | ||
| searchValue: string | ||
| onSelect: (item: EmployeeItem, checked: boolean) => void | ||
| onSelectAll?: (checked: boolean, visibleItems: EmployeeItem[]) => void |
| mode?: 'select' | ||
| selectedHolidayUuids: Set<string> | ||
| onSelectionChange: (item: HolidayItem, selected: boolean) => void | ||
| onSelectAll?: (selected: boolean, visibleItems: HolidayItem[]) => void |
| onSearchClear={onSearchClear} | ||
| selectionMode="multiple" | ||
| onSelect={onSelect} | ||
| onSelectAll={onSelectAll} |
| holidays={holidays} | ||
| selectedHolidayUuids={selectedUuids} | ||
| onSelectionChange={handleSelectionChange} | ||
| onSelectAll={handleSelectAll} |
Fresh Eyes ReviewFound 1 issue in this PR. Download findings.json — drag the file into Claude or use Generated by Fresh Eyes Reviewer | Share feedback in #ai-code-reviews |
krisxcrash
approved these changes
May 6, 2026
DataTable already calls onSelectAll?.(checked, data) when its header
checkbox is toggled, but every Time Off multi-select table was passing
a no-op (the prop was never plumbed through). Toggling the header
checkbox did nothing.
Plumb onSelectAll from the four consumers (TimeOffPolicyDetail employees
tab, SelectEmployees{Presentation,TimeOff,Holiday}, and
HolidaySelectionForm) through their props chains. Implementations
mutate the existing selectedUuids Set with the visible-data argument
DataTable hands back — the right scope so search-filtered-out rows
stay in sync.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Time Off select-all header checkbox lives inside a react-aria <Column> that installs a usePress handler stack. When the click bubbled to the Column, the checkbox's controlled DOM `checked` property desynced from React's _valueTracker — the row state and wrapper class toggled correctly but the input itself stayed visually inverted, so the header could not be unchecked. Stop click/pointerdown/mousedown propagation on the wrapper so the Column press tracker never sees the checkbox click. Keyboard activation (Tab + Space) is unaffected. Also addresses Copilot feedback on the original wiring PR: - onSelectAll is now required on SelectEmployeesProps and HolidaySelectionFormSelectModeProps so a future caller can't re-introduce a no-op header checkbox. - Add header-toggle tests in SelectEmployeesPresentation.test.tsx (both directions) and a full select-all/deselect-all integration test in HolidaySelectionForm.test.tsx. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5bb2761 to
432f045
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DataTablealready callsonSelectAll?.(checked, data)when its header checkbox is toggled, but every Time Off multi-select table dropped the prop on the floor — so toggling the header checkbox did nothing.onSelectAllthrough the prop chains for the four sites listed in the plan:TimeOffPolicyDetail→EmployeeTable(viaPolicyDetailLayout)SelectEmployeesstandalone (still used by tests/storybook) andSelectEmployeesPresentation(used bySelectEmployeesTimeOff+SelectEmployeesHoliday) →EmployeeTableHolidaySelectionFormPresentation→useDataViewselectedUuidsSet with the visible-data argumentDataTablehands back, so search-filtered-out rows stay in sync.useSelectEmployeesDataexposes a sharedhandleSelectAllso both the time-off and holiday wizards share one implementation.SelectEmployeesTimeOffkeeps its full-employee-record ref in sync the same way it does for single selects.onSelectAll(true, visibleItems).This is PR 7 in the time-off bug-fix slate captured in
~/.claude/plans/ok-i-want-to-partitioned-balloon.md.Test plan
npx tsc --noEmit— cleannpm run test -- --run src/components/UNSTABLE_TimeOff/— 298/298 passing (1 new test)🤖 Generated with Claude Code