Skip to content

Commit 9f20ee0

Browse files
RakeshPawarRakesh Pawar
andauthored
fix(react): forward ref to underlying web component (#655)
Co-authored-by: Rakesh Pawar <rakesh.pawar@juliusbaer.com>
1 parent 09ea6f7 commit 9f20ee0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react/src/runtime/create-component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ type EventNames = Record<string, EventName | string>;
77
// Type that's compatible with both React 18 and 19
88
type StencilProps<I extends HTMLElement, E extends EventNames> = Omit<React.HTMLAttributes<I>, keyof E> &
99
Partial<{ [K in keyof E]: E[K] extends EventName<infer T> ? (event: T) => void : (event: any) => void }> &
10-
Partial<Omit<I, keyof HTMLElement>>;
10+
Partial<Omit<I, keyof HTMLElement>> &
11+
React.RefAttributes<I>;
1112

1213
export type StencilReactComponent<I extends HTMLElement, E extends EventNames = {}> = React.FunctionComponent<
1314
StencilProps<I, E>

0 commit comments

Comments
 (0)