Skip to content

[bug]: AccordionTrigger throws error with asChild #4732

@UltimateGG

Description

@UltimateGG

Describe the bug

If you try to use the asChild prop with AccordionTrigger React throws an error because we try to render a icon and our children, but it can only render 1 (Radix limitation)

Affected component/components

Accordion

How to reproduce

Add asChild prop to an AccordionTrigger

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

None

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions