Skip to content

Commit 3d30a8a

Browse files
committed
fix: properly accept autoFocus
1 parent 37a718f commit 3d30a8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

package/src/components/Thread/Thread.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const ThreadWithContext = (props: ThreadPropsWithContext) => {
7676
additionalMessageInputProps,
7777
additionalMessageListProps,
7878
additionalMessageFlashListProps,
79-
autoFocus = true,
79+
autoFocus = false,
8080
closeThread,
8181
closeThreadOnDismount = true,
8282
disabled,
@@ -124,8 +124,9 @@ const ThreadWithContext = (props: ThreadPropsWithContext) => {
124124
const additionalTextInputProps = useMemo(
125125
() => ({
126126
editable: !disabled,
127+
autoFocus,
127128
}),
128-
[disabled],
129+
[disabled, autoFocus],
129130
);
130131

131132
if (!thread?.id) {

0 commit comments

Comments
 (0)