feat(table): add onCheckedChange to Table.CheckCell and Table.CheckHead#437
feat(table): add onCheckedChange to Table.CheckCell and Table.CheckHead#437mattrothenberg merged 1 commit intomainfrom
Conversation
Align Table.CheckCell and Table.CheckHead with the Checkbox component's signature by adding an `onCheckedChange` prop that takes an optional second argument exposing event details from the underlying Checkbox. The existing `onValueChange` prop is retained as a deprecated alias — it still works and continues to be called, so no consumer code needs to change immediately. The `no-deprecated-props` lint rule now flags `onValueChange` usage on these components, pointing migrators to the new name. This is a backwards-compatible change and ships as a minor bump. The deprecated alias will be removed in a future major version.
|
/bonk what say you? |
commit: |
There was a problem hiding this comment.
Review: LGTM ✅
This is a well-structured, backwards-compatible change that aligns Table.CheckCell and Table.CheckHead with the Checkbox component's signature.
What I verified:
-
Implementation (
table.tsx):- New
onCheckedChangeprop correctly accepts(checked: boolean, eventDetails?: CheckboxChangeEventDetails) => void - Deprecated
onValueChangeretained with@deprecatedJSDoc for lint rule integration - Both handlers fire when set, enabling smooth migration
- Event details properly passed through from underlying Checkbox
- New
-
Tests (
table.test.tsx) - All 3 pass:- ✅ New
onCheckedChangeprop works with event details - ✅ Deprecated
onValueChangestill fires for backward compatibility - ✅ Both props can coexist during migration
- ✅ New
-
Documentation (
table.mdx):- Clear migration examples showing before/after
- Event details usage documented
- Deprecation notice appropriately placed
-
Demos (
TableDemo.tsx):- All checkbox demos migrated to new
onCheckedChangeprop - Consistent pattern across
TableWithCheckboxDemo,TableSelectedRowDemo, andTableFullDemo
- All checkbox demos migrated to new
-
Changeset:
- Correctly marked as
minorbump for additive change - Clear explanation of migration path
- Correctly marked as
Code quality notes:
- Clean implementation with proper TypeScript types
- Follows the project's deprecation pattern (matches Checkbox, Select, Banner migrations)
displayNamealready set correctly for both components- Uses semantic token styling conventions appropriately
The unrelated test failures (missing component-registry.json) are pre-existing and not caused by this PR.
Approved for merge.
|
I've completed my review of PR #437 and posted an approving review. SummaryThe PR adds Key points verified:
The implementation follows Kumo's established deprecation patterns and the code is clean and well-tested. The unrelated test failures in the CI output are pre-existing issues with missing |
Docs PreviewCommit: |










































Summary
Align `Table.CheckCell` and `Table.CheckHead` with the `Checkbox` component's signature by adding an `onCheckedChange` prop that takes an optional second argument exposing event details. The existing `onValueChange` prop is retained as a deprecated alias — this is a backwards-compatible, additive change (minor bump).
Context
The v2 Checkbox breaking change removed `onValueChange` in favor of `onCheckedChange` (with optional event details). Table's `Table.CheckCell` / `Table.CheckHead` happened to use the same name (`onValueChange`) for their own consumer-facing prop — it's a Table prop, not a Checkbox passthrough, so v2 doesn't break Table consumers. But the naming collision would be confusing going forward: the Table prop would share a name with a prop Checkbox explicitly deleted.
Change
Migration (optional)
Why additive instead of breaking
Considered as part of the v2 major (synchronize with Checkbox) but landed as additive because:
Verification
Checklist