Skip to content

Commit 36a46de

Browse files
committed
fix: preserve forwardRef in ChatView for ref compatibility
1 parent 48216d3 commit 36a46de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,12 +2164,12 @@ const ChatViewInner: React.ForwardRefRenderFunction<ChatViewRef, ChatViewProps>
21642164

21652165
const ChatViewWithRef = forwardRef(ChatViewInner)
21662166

2167-
const ChatView: React.FC<ChatViewProps> = (props) => {
2167+
const ChatView = forwardRef<ChatViewRef, ChatViewProps>((props, ref) => {
21682168
return (
21692169
<DraftPersistenceProvider>
2170-
<ChatViewWithRef {...props} />
2170+
<ChatViewWithRef {...props} ref={ref} />
21712171
</DraftPersistenceProvider>
21722172
)
2173-
}
2173+
})
21742174

21752175
export default ChatView

0 commit comments

Comments
 (0)