We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dcdcec commit 52b8605Copy full SHA for 52b8605
src/core/primitives/Primitive/index.tsx
@@ -16,7 +16,10 @@ const createPrimitiveComponent = (elementType: SupportedElement) => {
16
const { asChild = false, children, ...elementProps } = props;
17
18
if (asChild && React.isValidElement(children)) {
19
- return React.cloneElement(children, { ...elementProps, ref });
+ return React.cloneElement(children, {
20
+ ...elementProps,
21
+ ref
22
+ } as React.HTMLAttributes<HTMLElement>);
23
}
24
25
return React.createElement(elementType, { ...elementProps, ref }, children);
0 commit comments