diff --git a/.changeset/young-squids-end.md b/.changeset/young-squids-end.md index d5b5b97c1a..9ea2cee92b 100644 --- a/.changeset/young-squids-end.md +++ b/.changeset/young-squids-end.md @@ -4,4 +4,7 @@ Removed redundant `selected` and `indeterminate` props from the `Checkbox` component. Use the `isSelected` and `isIndeterminate` props instead, which are the standard React Aria props and already handle both the checkbox behaviour and the corresponding CSS data attributes. +**Migration:** +Replace any usage of the `selected` and `indeterminate` props on `Checkbox` with the `isSelected` and `isIndeterminate` props. Note that the checked state and related CSS data attributes (such as `data-selected` and `data-indeterminate`) are now driven by React Aria, so any custom logic that previously inspected or set these via the old props should instead rely on the React Aria-managed state and attributes exposed through the new props. + **Affected components:** Checkbox diff --git a/packages/ui/src/components/Checkbox/Checkbox.tsx b/packages/ui/src/components/Checkbox/Checkbox.tsx index 62599d7ae9..d7b0bd6f76 100644 --- a/packages/ui/src/components/Checkbox/Checkbox.tsx +++ b/packages/ui/src/components/Checkbox/Checkbox.tsx @@ -46,7 +46,7 @@ export const Checkbox = forwardRef( )} - {children} +
{children}
)}