Skip to content

Commit ccb6839

Browse files
committed
Do not use asChild for indicator wrappers
1 parent f488f8a commit ccb6839

File tree

1 file changed

+2
-10
lines changed
  • packages/components/src/ui/radix-dropdown

1 file changed

+2
-10
lines changed

packages/components/src/ui/radix-dropdown/index.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,7 @@ export const DropdownMenuCheckboxItem = ( {
189189
return (
190190
<DropdownMenuStyled.CheckboxItem { ...props } checked={ checked }>
191191
<DropdownMenuStyled.ItemPrefixWrapper>
192-
{ /*
193-
TODO: adding `asChild` seems to trigger an error due to the fact
194-
that `Icon` doesn't forward refs to the underlying dom elements.
195-
*/ }
196-
<DropdownMenuPrimitive.ItemIndicator asChild>
192+
<DropdownMenuPrimitive.ItemIndicator>
197193
{ ( checked === 'indeterminate' || checked === true ) && (
198194
<Icon
199195
icon={
@@ -232,11 +228,7 @@ export const DropdownMenuRadioItem = ( {
232228
return (
233229
<DropdownMenuStyled.RadioItem { ...props }>
234230
<DropdownMenuStyled.ItemPrefixWrapper>
235-
{ /*
236-
TODO: adding `asChild` seems to trigger an error due to the fact
237-
that `Icon` doesn't forward refs to the underlying dom elements.
238-
*/ }
239-
<DropdownMenuPrimitive.ItemIndicator asChild>
231+
<DropdownMenuPrimitive.ItemIndicator>
240232
<Icon icon={ radioDot } size={ 20 } />
241233
</DropdownMenuPrimitive.ItemIndicator>
242234
</DropdownMenuStyled.ItemPrefixWrapper>

0 commit comments

Comments
 (0)