File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
packages/react/checkbox/src Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -228,8 +228,18 @@ const Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>(
228228 // @ts -expect-error
229229 internal_do_not_use_render = { ( { isFormControl } : CheckboxContextValue ) => (
230230 < >
231- < CheckboxTrigger { ...checkboxProps } ref = { forwardedRef } />
232- { isFormControl && < CheckboxBubbleInput /> }
231+ < CheckboxTrigger
232+ { ...checkboxProps }
233+ ref = { forwardedRef }
234+ // @ts -expect-error
235+ __scopeCheckbox = { __scopeCheckbox }
236+ />
237+ { isFormControl && (
238+ < CheckboxBubbleInput
239+ // @ts -expect-error
240+ __scopeCheckbox = { __scopeCheckbox }
241+ />
242+ ) }
233243 </ >
234244 ) }
235245 />
@@ -287,14 +297,7 @@ type InputProps = React.ComponentPropsWithoutRef<typeof Primitive.input>;
287297interface CheckboxBubbleInputProps extends Omit < InputProps , 'checked' > { }
288298
289299const CheckboxBubbleInput = React . forwardRef < HTMLInputElement , CheckboxBubbleInputProps > (
290- (
291- {
292- __scopeCheckbox,
293-
294- ...props
295- } : ScopedProps < CheckboxBubbleInputProps > ,
296- forwardedRef
297- ) => {
300+ ( { __scopeCheckbox, ...props } : ScopedProps < CheckboxBubbleInputProps > , forwardedRef ) => {
298301 const {
299302 control,
300303 hasConsumerStoppedPropagationRef,
You can’t perform that action at this time.
0 commit comments