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>(
228
228
// @ts -expect-error
229
229
internal_do_not_use_render = { ( { isFormControl } : CheckboxContextValue ) => (
230
230
< >
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
+ ) }
233
243
</ >
234
244
) }
235
245
/>
@@ -287,14 +297,7 @@ type InputProps = React.ComponentPropsWithoutRef<typeof Primitive.input>;
287
297
interface CheckboxBubbleInputProps extends Omit < InputProps , 'checked' > { }
288
298
289
299
const CheckboxBubbleInput = React . forwardRef < HTMLInputElement , CheckboxBubbleInputProps > (
290
- (
291
- {
292
- __scopeCheckbox,
293
-
294
- ...props
295
- } : ScopedProps < CheckboxBubbleInputProps > ,
296
- forwardedRef
297
- ) => {
300
+ ( { __scopeCheckbox, ...props } : ScopedProps < CheckboxBubbleInputProps > , forwardedRef ) => {
298
301
const {
299
302
control,
300
303
hasConsumerStoppedPropagationRef,
You can’t perform that action at this time.
0 commit comments