Accordion.Trigger
getting React.Children.only
error wen used with asChild
#2594
-
I am looking to integrate the I tried to check the source code, but it has too many inheritance and make it too complex for me in order to understand how to propose a solution 😊 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
the if you are putting |
Beta Was this translation helpful? Give feedback.
the
h3
is rendered by theAccordion.Header
part https://codesandbox.io/p/devbox/youthful-tess-xq95js?file=%2FApp.jsx%3A33%2C1-34%2C1.if you are putting
asChild
onAccordion.Trigger
, you're error will likely be occurring because it is trying to attach itself to the text within thebutton
, which is not valid.