Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ce-la-react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export function createComponent<I extends HTMLElement, E extends EventNames = {}
// Attributes to be passed to getTemplateHTML
const attrs: Record<string, string> = {};
// Props to be passed to React.createElement
const reactProps: Record<string, unknown> = {};
const reactProps: Record<string, unknown> & { children?: React.ReactNode } = {};
// Props to be set on element with setProperty
const elementProps: Record<string, unknown> = {};

Expand Down Expand Up @@ -322,6 +322,7 @@ export function createComponent<I extends HTMLElement, E extends EventNames = {}
dangerouslySetInnerHTML: {
__html: elementClass.getTemplateHTML(attrs, props),
},
key: "ce-la-react-ssr-template-shadow-root",
});

reactProps.children = [templateShadowRoot, reactProps.children];
Expand All @@ -341,7 +342,7 @@ export function createComponent<I extends HTMLElement, E extends EventNames = {}
},
[ref]
),
});
}, reactProps.children);
});

ReactComponent.displayName = displayName ?? elementClass.name;
Expand Down